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

kobotoolbox / kpi / 16742072488
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: beccagraber/dev-1452-new_action
DEFAULT BRANCH: master
Ran 05 Aug 2025 06:49AM UTC
Jobs 2
Files 661
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

05 Aug 2025 06:11AM UTC coverage: 81.231% (+0.04%) from 81.194%
16742072488

push

github

web-flow
feat(attachments): Add celery task to auto delete excess attachments DEV-240 (#5938)

### πŸ“£ Summary
Adds auto_delete_excess_attachments task that soft-deletes a user’s
oldest attachments until their storage usage falls below the configured
limit. This completes the attachment cleanup workflow for users
exceeding their storage quotas.


### πŸ“– Description
This PR adds the `auto_delete_excess_attachments(user_id)` Celery task,
which:
- Checks if the user is exceeding their storage quota
- If so, iterates over the user's oldest attachments (`date_created`
order)
- Soft-deletes attachments using the existing `move_to_trash()` utility
- Stops once the user is back within the allowed quota

6408 of 10092 branches covered (63.5%)

32 of 36 new or added lines in 1 file covered. (88.89%)

719 existing lines in 27 files now uncovered.

24289 of 29901 relevant lines covered (81.23%)

1.6 hits per line

New Missed Lines in Diff

Lines Coverage βˆ† File
4
81.16
11.71% kobo/apps/trash_bin/tasks/attachment.py

Uncovered Existing Lines

Lines Coverage βˆ† File
1
87.32
-1.41% kobo/apps/organizations/admin/organization.py
1
83.33
-5.56% kpi/urls/__init__.py
1
93.62
-2.13% kpi/utils/django_orm_helper.py
2
93.53
-1.0% kobo/apps/mass_emails/tasks.py
3
63.64
-27.27% kobo/apps/accounts/utils.py
3
82.42
-1.82% kobo/apps/organizations/models.py
3
86.67
-10.0% kobo/apps/organizations/utils.py
3
90.52
-2.59% kpi/views/environment.py
4
83.33
-8.33% kobo/apps/accounts/mfa/models.py
7
0.0
-100.0% kobo/apps/stripe/apps.py
8
0.0
-100.0% kobo/apps/stripe/urls.py
10
83.87
-10.75% kobo/apps/subsequences/api_view.py
11
86.67
-2.16% kobo/apps/openrosa/libs/utils/logger_tools.py
12
35.0
-60.0% kobo/apps/stripe/utils/import_management.py
12
0.0
-75.0% kobo/apps/stripe/utils/view_utils.py
15
0.0
-100.0% kobo/apps/stripe/tasks.py
19
0.0
-65.52% kobo/apps/stripe/admin.py
23
0.0
-92.0% kobo/apps/stripe/signals.py
24
75.49
-23.53% kpi/utils/usage_calculator.py
25
47.89
-35.21% kobo/apps/mass_emails/user_queries.py
26
27.78
-72.22% kobo/apps/stripe/utils/limit_enforcement.py
27
57.97
-39.13% kobo/apps/trackers/utils.py
64
0.0
-98.46% kobo/apps/stripe/serializers.py
64
21.43
-76.19% kobo/apps/stripe/utils/billing_dates.py
86
26.5
-73.5% kobo/apps/stripe/utils/subscription_limits.py
111
0.0
-90.98% kobo/apps/stripe/models.py
154
0.0
-95.65% kobo/apps/stripe/views.py
Jobs
ID Job ID Ran Files Coverage
1 16742072488.1 05 Aug 2025 06:49AM UTC 661
78.8
2 16742072488.2 05 Aug 2025 06:52AM UTC 661
81.21
Source Files on build 16742072488
  • Tree
  • List 661
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage βˆ† File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 45c9b12d on github
  • Prev Build on main (#16726115707)
  • Next Build on main (#16758296653)
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