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

kobotoolbox / kpi / 13013940587
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: dev-1257-remove-v1-forms-endpoint
DEFAULT BRANCH: master
Ran 28 Jan 2025 04:12PM UTC
Jobs 1
Files 625
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

28 Jan 2025 03:33PM UTC coverage: 80.584% (-0.02%) from 80.601%
13013940587

push

github

web-flow
fix(exports): tasks stuck in processing TASK-1243 (#5436)

### đŸ“Ŗ Summary
Fixes occasional problem where tasks end up showing as 'Processing'
forever.


### 💭 Notes
Tasks were failing when the celery task started too quickly and tried to
fetch the task before it had actually hit the database. This PR
implements 2 guards against this:
1. Call the tasks from within an on_commit block to ensure they only
start after the task object has made it to the database
2. Automatically catch ObjectDoesNotExist exceptions and retry the task
a hardcoded number of times. `task.retry` takes care of putting some
time in between retries



### 👀 Preview steps
This bug tends to only appear in low traffic when the celery queue is
empty. Make sure `CELERY_TASK_ALWAYS_EAGER` is false.

1. â„šī¸ have an account and a project
3. Export the project submissions
4. 🔴 [on main] The job will show as 'Processing' indefinitely. In the
worker logs, you'll see
`kpi.models.import_export_task.SubmissionExportTask.DoesNotExist:
SubmissionExportTask matching query does not exist`
5. đŸŸĸ [on PR] The job will only show as 'Processing' for a few seconds
and then will complete.

5928 of 9467 branches covered (62.62%)

22 of 23 new or added lines in 6 files covered. (95.65%)

6 existing lines in 2 files now uncovered.

22595 of 28039 relevant lines covered (80.58%)

0.81 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
74.19
0.28% kobo/apps/project_views/views.py

Uncovered Existing Lines

Lines Coverage ∆ File
1
92.18
-0.18% kpi/models/asset.py
5
83.82
-0.86% kpi/models/import_export_task.py
Jobs
ID Job ID Ran Files Coverage
1 13013940587.1 28 Jan 2025 04:12PM UTC 625
80.58
Source Files on build 13013940587
  • Tree
  • List 625
  • Changed 8
  • Source Changed 0
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • aa5a20c8 on github
  • Prev Build on main (#13010554345)
  • Next Build on main (#13021152888)
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