• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kobotoolbox / kpi / 17330937152 / 2
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: beccagraber/dev-1453-run-external-process
DEFAULT BRANCH: master
Ran 29 Aug 2025 06:49PM UTC
Files 860
Run time 24s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Aug 2025 06:02PM UTC coverage: 81.071% (+2.3%) from 78.763%
17330937152.2

push

github

web-flow
feat(instanceHistory): Celery task to clean instance history records DEV-753 (#6165)

### 📣 Summary
InstanceHistory objects are kept for an amount of days given by the
constance parameter SUBMISSION_HISTORY_GRACE_PERIOD. After this period
has passed, the records that have no associated instance (xform_instance
= NULL) are deleted by a celery task that runs weekly.

### 👀 Preview steps
This is covered with unit tests. However, to test you could:

1. Have a project with submissions
2. Delete some submissions 
3. Configure the constance parameter SUBMISSION_HISTORY_GRACE_PERIOD to
0 days.
4. Get a shell (`./manage.py shell_plus`, via docker exec bash) and
inspect the InstanceHistory objects
```
InstanceHistory.objects.filter(xform_instance__isnull=True).count()
```
5. Manually call the task, from the shell:
```
from kobo.apps.openrosa.apps.logger.tasks import delete_expired_instance_history_records

delete_expired_instance_history_records()
```
6. Inspect again the count
`InstanceHistory.objects.filter(xform_instance__isnull=True).count()`

6949 of 10956 branches covered (63.43%)

26618 of 32833 relevant lines covered (81.07%)

0.81 hits per line

Source Files on job 17330937152.2
  • Tree
  • List 860
  • Changed 32
  • Source Changed 0
  • Coverage Changed 32
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 17330937152
  • ce6e1c0b on github
  • Prev Job for on main (#17328856499.1)
  • Next Job for on main (#17334669984.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc