mirror of
https://github.com/ansible/awx.git
synced 2026-02-20 20:50:06 -03:30
Implement cluster health checks
* Add a local node queue to execute targeted jobs * Add a setting for active cluster node id (per-node) * Base the heartbeat time on the `modified` time on the Instance table * Add periodic task that calls save() on the instance to update the heartbeat time if services are up * Purge/update any ha/instance management commands * Fix up CELERY_ROUTES settings data structure
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
# Development settings for AWX project.
|
||||
|
||||
# Python
|
||||
import socket
|
||||
import copy
|
||||
import sys
|
||||
import traceback
|
||||
@@ -106,3 +107,7 @@ try:
|
||||
except ImportError:
|
||||
traceback.print_exc()
|
||||
sys.exit(1)
|
||||
|
||||
CLUSTER_HOST_ID = socket.gethostname()
|
||||
CELERY_ROUTES['awx.main.tasks.cluster_node_heartbeat'] = {'queue': CLUSTER_HOST_ID, 'routing_key': CLUSTER_HOST_ID}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user