1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 16:51:11 +03:00

Merge pull request #5709 from benthomasson/fix_gather_analytics_crontab

Fixes crontab for gather_analytics to run once every 4 hours

Reviewed-by: Christian Adams <rooftopcellist@gmail.com>
             https://github.com/rooftopcellist
This commit is contained in:
softwarefactory-project-zuul[bot] 2020-01-20 19:21:27 +00:00 committed by GitHub
commit 8b10da9589
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,6 +6,7 @@ import re # noqa
import sys
from datetime import timedelta
from celery.schedules import crontab
import random
# global settings
from django.conf import global_settings
@ -441,7 +442,7 @@ CELERYBEAT_SCHEDULE = {
},
'gather_analytics': {
'task': 'awx.main.tasks.gather_analytics',
'schedule': crontab(hour='*/6')
'schedule': crontab(hour='*/6', minute=random.randint(0,59))
},
'task_manager': {
'task': 'awx.main.scheduler.tasks.run_task_manager',