mirror of
https://github.com/ansible/awx.git
synced 2026-02-22 21:46:00 -03:30
Merge pull request #4829 from ryanpetrello/fix-4294
Fix error with rejoining node to cluster after lost connection to postgres Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
@@ -33,7 +33,11 @@ def reap(instance=None, status='failed', excluded_uuids=[]):
|
|||||||
'''
|
'''
|
||||||
Reap all jobs in waiting|running for this instance.
|
Reap all jobs in waiting|running for this instance.
|
||||||
'''
|
'''
|
||||||
me = instance or Instance.objects.me()
|
me = instance
|
||||||
|
if me is None:
|
||||||
|
(changed, me) = Instance.objects.get_or_register()
|
||||||
|
if changed:
|
||||||
|
logger.info("Registered tower node '{}'".format(me.hostname))
|
||||||
now = tz_now()
|
now = tz_now()
|
||||||
workflow_ctype_id = ContentType.objects.get_for_model(WorkflowJob).id
|
workflow_ctype_id = ContentType.objects.get_for_model(WorkflowJob).id
|
||||||
jobs = UnifiedJob.objects.filter(
|
jobs = UnifiedJob.objects.filter(
|
||||||
|
|||||||
Reference in New Issue
Block a user