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

kobotoolbox / kpi / 17330937152
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: beccagraber/dev-1497-show-most-recently-created-qual-answer
DEFAULT BRANCH: master
Ran 29 Aug 2025 06:36PM UTC
Jobs 2
Files 860
Run time 2min
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.092% (+0.007%) from 81.085%
17330937152

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()`

6902 of 10897 branches covered (63.34%)

15 of 15 new or added lines in 1 file covered. (100.0%)

26625 of 32833 relevant lines covered (81.09%)

1.6 hits per line

Jobs
ID Job ID Ran Files Coverage
1 17330937152.1 29 Aug 2025 06:36PM UTC 860
78.77
2 17330937152.2 29 Aug 2025 06:49PM UTC 860
81.07
Source Files on build 17330937152
  • Tree
  • List 860
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • ce6e1c0b on github
  • Prev Build on main (#17328856499)
  • Next Build on main (#17334669984)
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

© 2025 Coveralls, Inc