mirror of
https://github.com/ansible/awx.git
synced 2026-03-11 14:39:30 -02:30
put atomic block inside lock block
This commit is contained in:
@@ -679,9 +679,9 @@ class TaskManager():
|
|||||||
return finished_wfjs
|
return finished_wfjs
|
||||||
|
|
||||||
def schedule(self):
|
def schedule(self):
|
||||||
with transaction.atomic():
|
# Lock
|
||||||
# Lock
|
with advisory_lock('task_manager_lock', wait=False) as acquired:
|
||||||
with advisory_lock('task_manager_lock', wait=False) as acquired:
|
with transaction.atomic():
|
||||||
if acquired is False:
|
if acquired is False:
|
||||||
logger.debug("Not running scheduler, another task holds lock")
|
logger.debug("Not running scheduler, another task holds lock")
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user