Add clearsessions and cleartokens system jobs

* add system job for gathering insights analytics
* enforce schedule enablement with analytics setting
* remove celery beat analytics job
* keep analytics schedule & setting enablement in sync in API
* handles updating schedules for multiple sys job schedules
* add analytics setting & schedule test
* rm ui modal from collection sys job
This commit is contained in:
Christian Adams
2019-05-01 12:16:15 -04:00
parent 2addf20907
commit 8ca0c1b992
9 changed files with 247 additions and 60 deletions

View File

@@ -1139,7 +1139,8 @@ class SystemJobOptions(BaseModel):
SYSTEM_JOB_TYPE = [
('cleanup_jobs', _('Remove jobs older than a certain number of days')),
('cleanup_activitystream', _('Remove activity stream entries older than a certain number of days')),
('cleanup_facts', _('Purge and/or reduce the granularity of system tracking data')),
('clearsessions', _('Removes expired browser sessions from the database')),
('cleartokens', _('Removes expired OAuth 2 access tokens and refresh tokens'))
]
class Meta: