browsertrix/backend/btrixcloud/migrations
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
..
__init__.py migration improvements: (#1228) 2023-09-28 12:04:19 -07:00
migration_0001_archives_to_orgs.py
migration_0002_crawlconfig_crawlstats.py
migration_0003_mutable_crawl_configs.py optimization: convert all uses of 'async for' to use iterator directly (#1229) 2023-09-28 12:31:08 -07:00
migration_0004_config_seeds.py optimization: convert all uses of 'async for' to use iterator directly (#1229) 2023-09-28 12:31:08 -07:00
migration_0005_operator_scheduled_jobs.py optimization: convert all uses of 'async for' to use iterator directly (#1229) 2023-09-28 12:31:08 -07:00
migration_0006_precompute_crawl_stats.py optimization: convert all uses of 'async for' to use iterator directly (#1229) 2023-09-28 12:31:08 -07:00
migration_0007_colls_and_config_update.py optimization: convert all uses of 'async for' to use iterator directly (#1229) 2023-09-28 12:31:08 -07:00
migration_0008_precompute_crawl_file_stats.py optimization: convert all uses of 'async for' to use iterator directly (#1229) 2023-09-28 12:31:08 -07:00
migration_0009_crawl_types.py
migration_0010_collection_total_size.py optimization: convert all uses of 'async for' to use iterator directly (#1229) 2023-09-28 12:31:08 -07:00
migration_0011_crawl_timeout_configmap.py Add migration to replace None with 0 for configmap CRAWL_TIMEOUT (#1008) 2023-07-24 15:49:26 -04:00
migration_0012_notes_to_description.py Rename notes to description in frontend and backend (#1011) 2023-07-26 13:00:04 -07:00
migration_0013_crawl_name.py optimization: convert all uses of 'async for' to use iterator directly (#1229) 2023-09-28 12:31:08 -07:00
migration_0014_to_collection_ids.py feat: implement 'collections' array with {name, id} for archived item details (#1098) 2023-08-25 00:26:46 -07:00
migration_0015_org_storage_usage.py optimization: convert all uses of 'async for' to use iterator directly (#1229) 2023-09-28 12:31:08 -07:00
migration_0016_operator_scheduled_jobs_v2.py optimization: convert all uses of 'async for' to use iterator directly (#1229) 2023-09-28 12:31:08 -07:00
migration_0017_storage_by_type.py optimization: convert all uses of 'async for' to use iterator directly (#1229) 2023-09-28 12:31:08 -07:00
migration_0018_usernames.py User refactor + remove fastapi_users dependency + update fastapi (#1290) 2023-10-18 10:49:23 -07:00
migration_0019_org_slug.py Add slugs to org backend (#1250) 2023-10-10 18:30:09 -07:00
migration_0020_org_storage_refs.py Storage Refactor: Replication + Custom Storage Support (#1296) 2023-10-26 21:44:09 -07:00
migration_0021_profile_filenames.py Regression fix: add profiles/ prefix to profile filenames (#1365) 2023-11-09 17:44:16 -08:00
migration_0022_partial_complete.py Add extra and gifted execution minutes (#1361) 2023-12-07 14:34:37 -05:00
migration_0023_available_extra_exec_mins.py Add extra and gifted execution minutes (#1361) 2023-12-07 14:34:37 -05:00