mirror of
https://github.com/ansible/awx.git
synced 2026-02-26 07:26:03 -03:30
Fixes crontab for gather_analytics to run once every 4 hours
This commit is contained in:
@@ -6,6 +6,7 @@ import re # noqa
|
|||||||
import sys
|
import sys
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
from celery.schedules import crontab
|
from celery.schedules import crontab
|
||||||
|
import random
|
||||||
|
|
||||||
# global settings
|
# global settings
|
||||||
from django.conf import global_settings
|
from django.conf import global_settings
|
||||||
@@ -441,7 +442,7 @@ CELERYBEAT_SCHEDULE = {
|
|||||||
},
|
},
|
||||||
'gather_analytics': {
|
'gather_analytics': {
|
||||||
'task': 'awx.main.tasks.gather_analytics',
|
'task': 'awx.main.tasks.gather_analytics',
|
||||||
'schedule': crontab(hour='*/6')
|
'schedule': crontab(hour='*/6', minute=random.randint(0,59))
|
||||||
},
|
},
|
||||||
'task_manager': {
|
'task_manager': {
|
||||||
'task': 'awx.main.scheduler.tasks.run_task_manager',
|
'task': 'awx.main.scheduler.tasks.run_task_manager',
|
||||||
|
|||||||
Reference in New Issue
Block a user