From 3065e29deb998959748a63f8248182f289c55b65 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 a298b08eea..9ff1120ea5 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -3151,6 +3151,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