mirror of
https://github.com/ansible/awx.git
synced 2026-05-23 08:37:48 -02:30
Merge pull request #3518 from jbradberry/isolated-heartbeat
Make use of user-defined settings for defining the isolated nodes heartbeat Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
@@ -496,11 +496,7 @@ CELERYBEAT_SCHEDULE = {
|
|||||||
'schedule': timedelta(seconds=20),
|
'schedule': timedelta(seconds=20),
|
||||||
'options': {'expires': 20}
|
'options': {'expires': 20}
|
||||||
},
|
},
|
||||||
'isolated_heartbeat': {
|
# 'isolated_heartbeat': set up at the end of production.py and development.py
|
||||||
'task': 'awx.main.tasks.awx_isolated_heartbeat',
|
|
||||||
'schedule': timedelta(seconds=AWX_ISOLATED_PERIODIC_CHECK),
|
|
||||||
'options': {'expires': AWX_ISOLATED_PERIODIC_CHECK * 2},
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
AWX_INCONSISTENT_TASK_INTERVAL = 60 * 3
|
AWX_INCONSISTENT_TASK_INTERVAL = 60 * 3
|
||||||
|
|
||||||
|
|||||||
@@ -143,6 +143,15 @@ except ImportError:
|
|||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
sys.exit(1)
|
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()
|
CLUSTER_HOST_ID = socket.gethostname()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -107,3 +107,12 @@ except IOError:
|
|||||||
raise ImproperlyConfigured(msg)
|
raise ImproperlyConfigured(msg)
|
||||||
else:
|
else:
|
||||||
raise
|
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
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user