mirror of
https://github.com/ansible/awx.git
synced 2026-02-24 22:46:01 -03:30
* Under the new postgres backed notify/listen message queue, this never actually worked. Without using the database to store state, we can not provide a at-most-once delivery mechanism w/ multi-readers. * With this change, work is done ONLY on the node that requested for the work to be done. Under rabbitmq, the node that was first to get the message off the queue would do the work; presumably the least busy node.
17 lines
354 B
Python
17 lines
354 B
Python
|
|
# Python
|
|
import logging
|
|
|
|
# AWX
|
|
from awx.main.scheduler import TaskManager
|
|
from awx.main.dispatch.publish import task
|
|
from awx.main.dispatch import get_local_queuename
|
|
|
|
logger = logging.getLogger('awx.main.scheduler')
|
|
|
|
|
|
@task(queue=get_local_queuename)
|
|
def run_task_manager():
|
|
logger.debug("Running Tower task manager.")
|
|
TaskManager().schedule()
|