Skip to content

Commit

Permalink
Fix typo breaking postprocess and add more types (#4404)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanmetzman committed Nov 13, 2024
1 parent 2073870 commit f4df493
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/clusterfuzz/_internal/base/tasks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/clusterfuzz/_internal/base/tasks/task_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f4df493

Please sign in to comment.