Skip to content

Commit a714059

Browse files
Fix typo breaking postprocess and add more types (#4404)
1 parent 2073870 commit a714059

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/clusterfuzz/_internal/base/tasks/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ def is_done_collecting_messages():
281281
def get_postprocess_task():
282282
"""Gets a postprocess task if one exists."""
283283
# This should only be run on non-preemptible bots.
284-
if not (task_utils.is_remotely_executing_utasks() and
284+
if not (task_utils.is_remotely_executing_utasks() or
285285
task_utils.get_opted_in_tasks()):
286286
return None
287287
# Postprocess is platform-agnostic, so we run all such tasks on our

src/clusterfuzz/_internal/base/tasks/task_utils.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ def is_remotely_executing_utasks(task=None) -> bool:
3434
return True
3535
if task is None:
3636
return False
37-
return is_task_opted_into_uworker_execution(task)
37+
return bool(is_task_opted_into_uworker_execution(task))
3838

3939

40-
def get_opted_in_tasks():
40+
def get_opted_in_tasks() -> List[str]:
4141
return local_config.ProjectConfig().get('uworker_tasks', [])
4242

4343

44-
def is_task_opted_into_uworker_execution(task):
44+
def is_task_opted_into_uworker_execution(task: str) -> bool:
4545
# TODO(metzman): Remove this after OSS-Fuzz and Chrome are at parity.
4646
uworker_tasks = get_opted_in_tasks()
4747
return task in uworker_tasks

0 commit comments

Comments
 (0)