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

kobotoolbox / kpi / 16560585324
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: beccagraber/dev-1452-new_action
DEFAULT BRANCH: master
Ran 28 Jul 2025 05:45AM UTC
Jobs 2
Files 660
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 Jul 2025 05:08AM UTC coverage: 81.177% (-0.02%) from 81.198%
16560585324

push

github

web-flow
feat(attachments): Add Celery task to process users exceeding storage limit DEV-239 (#5909)

### 📣 Summary
Adds a new celery task that identifies users who have exceeded their
storage limits for a configurable number of days and dispatches a
cleanup task for each. This prepares the foundation for automated
enforcement of storage quotas via attachment deletion.


### 📖 Description
This PR introduces a Celery task
(`schedule_auto_attachment_cleanup_for_users`) that:

- Runs periodically via Celery Beat (every 30 mins, currently commented
out in `CELERY_BEAT_SCHEDULE`)
- Filters users from the `ExceededLimitCounter` model who have exceeded
their storage quota for more than
`LIMIT_ATTACHMENT_REMOVAL_GRACE_PERIOD` days (default: 90)
- For each qualifying user, dispatches a cleanup task
(`auto_delete_excess_attachments(user_id)`), currently a placeholder.

Additional Constance settings added:

- `AUTO_DELETE_ATTACHMENTS`: Global toggle for enabling/disabling the
auto deletion (default: False)
- `LIMIT_ATTACHMENT_REMOVAL_GRACE_PERIOD`: Grace period before
triggering cleanup for over-quota users

6381 of 10060 branches covered (63.43%)

6 of 14 new or added lines in 1 file covered. (42.86%)

24232 of 29851 relevant lines covered (81.18%)

1.6 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
8
69.44
-16.92% kobo/apps/trash_bin/tasks/attachment.py
Jobs
ID Job ID Ran Files Coverage
1 16560585324.1 28 Jul 2025 05:45AM UTC 660
78.83
2 16560585324.2 28 Jul 2025 05:48AM UTC 660
81.16
Source Files on build 16560585324
  • Tree
  • List 660
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 205fdf1c on github
  • Prev Build on main (#16505623464)
  • Next Build on main (#16575580117)
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