From 69701a91968666d9a1babd45f3306d697888f929 Mon Sep 17 00:00:00 2001 From: Jonathan Metzman Date: Thu, 26 Dec 2024 08:35:56 -0500 Subject: [PATCH] Make tworkers pull from postprocess or preprocess There won't be any other workers to postproces anymore. --- src/clusterfuzz/_internal/base/tasks/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/clusterfuzz/_internal/base/tasks/__init__.py b/src/clusterfuzz/_internal/base/tasks/__init__.py index 2f7b520065..140ecb3b8c 100644 --- a/src/clusterfuzz/_internal/base/tasks/__init__.py +++ b/src/clusterfuzz/_internal/base/tasks/__init__.py @@ -324,6 +324,8 @@ def tworker_get_task(): # queue that is probably empty) to do a single preprocess. Investigate # combining preprocess and postprocess queues and allowing pulling of # multiple messages. + if random.random() < .5: + return get_postprocess_task() return get_preprocess_task()