browsertrix/backend/btrixcloud
Tessa Walsh be41c48c27
Add extra and gifted execution minutes (#1361)
Fixes #1358 

- Adds `extraExecMinutes` and `giftedExecMinutes` org quotas, which are
not reset monthly but are updateable amounts that carry across months
- Adds `quotaUpdate` field to `Organization` to track when quotas were
updated with timestamp
- Adds `extraExecMinutesAvailable` and `giftedExecMinutesAvailable`
fields to `Organization` to help with tracking available time left
(includes tested migration to initialize these to 0)
- Modifies org backend to track time across multiple categories, using
monthlyExecSeconds, then giftedExecSeconds, then extraExecSeconds.
All time is also written into crawlExecSeconds, which is now the monthly
total and also contains any overage time above the quotas
- Updates Dashboard crawling meter to include all types of execution
time if `extraExecMinutes` and/or `giftedExecMinutes` are set above 0
- Updates Dashboard Usage History table to include all types of
execution time (only displaying columns that have data)
- Adds backend nightly test to check handling of quotas and execution
time
- Includes migration to add new fields and copy crawlExecSeconds to
monthlyExecSeconds for previous months

Co-authored-by: emma <hi@emma.cafe>
2023-12-07 14:34:37 -05:00
..
migrations Add extra and gifted execution minutes (#1361) 2023-12-07 14:34:37 -05:00
__init__.py
auth.py
background_jobs.py Add API endpoint to retry all failed bg jobs (#1396) 2023-12-05 13:00:45 -08:00
basecrawls.py Add crawl, upload, and collection delete webhook event notifications (#1363) 2023-11-09 18:19:08 -08:00
colls.py Add crawl, upload, and collection delete webhook event notifications (#1363) 2023-11-09 18:19:08 -08:00
crawlconfigs.py
crawlmanager.py Implement retry API endpoint for failed background jobs (#1356) 2023-11-09 18:09:37 -08:00
crawls.py Fixes allowed actions for viewers and crawlers throughout the app (#1326) 2023-11-17 14:41:21 -08:00
db.py Add extra and gifted execution minutes (#1361) 2023-12-07 14:34:37 -05:00
emailsender.py Email Templates (#1375) 2023-11-15 15:22:12 -08:00
invites.py Email Templates (#1375) 2023-11-15 15:22:12 -08:00
k8sapi.py
main_op.py Send email to superuser when background job fails (#1355) 2023-11-08 19:55:59 -08:00
main.py Add API endpoint to retry all failed bg jobs (#1396) 2023-12-05 13:00:45 -08:00
models.py Add extra and gifted execution minutes (#1361) 2023-12-07 14:34:37 -05:00
operator.py Replace partial_complete -> stopped_by_user or stopped_quota_reached + operator edge cases (#1368) 2023-11-14 11:17:16 -08:00
orgs.py Add extra and gifted execution minutes (#1361) 2023-12-07 14:34:37 -05:00
pagination.py
profiles.py Regression fix: add profiles/ prefix to profile filenames (#1365) 2023-11-09 17:44:16 -08:00
storages.py charts cleanup: (#1360) 2023-11-08 19:24:00 -08:00
uploads.py
users.py
utils.py
version.py version: bump to 1.8.1 2023-11-17 14:39:52 -08:00
webhooks.py Add crawl, upload, and collection delete webhook event notifications (#1363) 2023-11-09 18:19:08 -08:00
zip.py