Make use of user-defined settings for defining the isolated nodes heartbeat

Just in case the user has created custom settings files which set
AWX_ISOLATED_PERIODIC_CHECK.
This commit is contained in:
Jeff Bradberry 2019-03-27 10:47:38 -04:00
parent 2129f12085
commit bc6df9cab8
2 changed files with 18 additions and 0 deletions

View File

@ -142,6 +142,15 @@ except ImportError:
traceback.print_exc()
sys.exit(1)
CELERYBEAT_SCHEDULE.update({ # noqa
'isolated_heartbeat': {
'task': 'awx.main.tasks.awx_isolated_heartbeat',
'schedule': timedelta(seconds=AWX_ISOLATED_PERIODIC_CHECK), # noqa
'options': {'expires': AWX_ISOLATED_PERIODIC_CHECK * 2}, # noqa
}
})
CLUSTER_HOST_ID = socket.gethostname()
try:

View File

@ -107,3 +107,12 @@ except IOError:
raise ImproperlyConfigured(msg)
else:
raise
CELERYBEAT_SCHEDULE.update({ # noqa
'isolated_heartbeat': {
'task': 'awx.main.tasks.awx_isolated_heartbeat',
'schedule': timedelta(seconds=AWX_ISOLATED_PERIODIC_CHECK), # noqa
'options': {'expires': AWX_ISOLATED_PERIODIC_CHECK * 2}, # noqa
}
})