From 098201be0bfe8365a59c4b701d757b0de84c5f9c Mon Sep 17 00:00:00 2001 From: chris meyers Date: Fri, 15 Oct 2021 16:27:24 -0400 Subject: [PATCH] avoid work_results and work release race * Unsure exactly why this happens but there seems to be a race condition related to the time window between Receptor work_results and work release. This sleep extends that window and hopefully avoids the race condition. --- awx/main/tasks.py | 1 + 1 file changed, 1 insertion(+) diff --git a/awx/main/tasks.py b/awx/main/tasks.py index 3e3e4c3dda..510a695c37 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -3146,6 +3146,7 @@ class AWXReceptorJob: except Exception: raise RuntimeError(detail) + time.sleep(3) return res # Spawned in a thread so Receptor can start reading before we finish writing, we