browsertrix/backend
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
..
btrixcloud Add extra and gifted execution minutes (#1361) 2023-12-07 14:34:37 -05:00
test Add API tests for browser profiles (#1392) 2023-11-28 10:40:58 -05:00
test_nightly Add extra and gifted execution minutes (#1361) 2023-12-07 14:34:37 -05:00
.pylintrc
Dockerfile
mypy.ini Improved type checking for backend with mypy (#1174) 2023-09-13 19:40:26 -07:00
requirements.txt Replace partial_complete -> stopped_by_user or stopped_quota_reached + operator edge cases (#1368) 2023-11-14 11:17:16 -08:00
test-requirements.txt Add slugs to org backend (#1250) 2023-10-10 18:30:09 -07:00