Skip to content

Commit

Permalink
Merge pull request #190 from conductor-sdk/update-task-handler
Browse files Browse the repository at this point in the history
Added default value for workers at TaskHandler
  • Loading branch information
gardusig authored Jun 15, 2023
2 parents d0f1cd2 + c217755 commit 9e4f25f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/conductor/client/automator/task_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@ def get_annotated_workers():
class TaskHandler:
def __init__(
self,
workers: List[WorkerInterface],
workers: List[WorkerInterface] = None,
configuration: Configuration = None,
metrics_settings: MetricsSettings = None,
scan_for_annotated_workers: bool = None,
):
if not isinstance(workers, list):
if workers is None:
workers = []
elif not isinstance(workers, list):
workers = [workers]
if scan_for_annotated_workers is True:
for worker in get_annotated_workers():
Expand Down

0 comments on commit 9e4f25f

Please sign in to comment.