diff --git a/src/clusterfuzz/_internal/base/tasks/__init__.py b/src/clusterfuzz/_internal/base/tasks/__init__.py index edf3027435..e57c739a24 100644 --- a/src/clusterfuzz/_internal/base/tasks/__init__.py +++ b/src/clusterfuzz/_internal/base/tasks/__init__.py @@ -281,7 +281,7 @@ def is_done_collecting_messages(): def get_postprocess_task(): """Gets a postprocess task if one exists.""" # This should only be run on non-preemptible bots. - if not (task_utils.is_remotely_executing_utasks() and + if not (task_utils.is_remotely_executing_utasks() or task_utils.get_opted_in_tasks()): return None # Postprocess is platform-agnostic, so we run all such tasks on our diff --git a/src/clusterfuzz/_internal/base/tasks/task_utils.py b/src/clusterfuzz/_internal/base/tasks/task_utils.py index 188bd9ff7f..9248dad52d 100644 --- a/src/clusterfuzz/_internal/base/tasks/task_utils.py +++ b/src/clusterfuzz/_internal/base/tasks/task_utils.py @@ -34,14 +34,14 @@ def is_remotely_executing_utasks(task=None) -> bool: return True if task is None: return False - return is_task_opted_into_uworker_execution(task) + return bool(is_task_opted_into_uworker_execution(task)) def get_opted_in_tasks(): return local_config.ProjectConfig().get('uworker_tasks', []) -def is_task_opted_into_uworker_execution(task): +def is_task_opted_into_uworker_execution(task: str) -> bool: # TODO(metzman): Remove this after OSS-Fuzz and Chrome are at parity. uworker_tasks = get_opted_in_tasks() return task in uworker_tasks