mirror of
https://github.com/ansible/awx.git
synced 2026-02-12 07:04:45 -03:30
* WIP First pass * started removing feature flags and adjusting logic * Add decorator * moved to dispatcher decorator * updated as many as I could find * Keep callback receiver working * remove any code that is not used by the call back receiver * add back auto_max_workers * added back get_auto_max_workers into common utils * Remove control and hazmat (squash this not done) * moved status out and deleted control as no longer needed * removed unused imports * adjusted test import to pull correct method * fixed imports and addressed clusternode heartbeat test * Update function comments * Add back hazmat for config and remove baseworker * added back hazmat per @alancoding feedback around config * removed baseworker completely and refactored it into the callback worker * Fix dispatcher run call and remove dispatch setting * remove dispatcher mock publish setting * Adjust heartbeat arg and more formatting * fixed the call to cluster_node_heartbeat missing binder * Fix attribute error in server logs
18 lines
459 B
Python
18 lines
459 B
Python
# Python
|
|
import logging
|
|
|
|
# Dispatcherd
|
|
from dispatcherd.publish import task
|
|
|
|
# AWX
|
|
from awx.main.analytics.subsystem_metrics import DispatcherMetrics, CallbackReceiverMetrics
|
|
from awx.main.dispatch import get_task_queuename
|
|
|
|
logger = logging.getLogger('awx.main.scheduler')
|
|
|
|
|
|
@task(queue=get_task_queuename, timeout=300, on_duplicate='discard')
|
|
def send_subsystem_metrics():
|
|
DispatcherMetrics().send_metrics()
|
|
CallbackReceiverMetrics().send_metrics()
|