Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 2 durabletask/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ def task_id(self) -> int:


# Orchestrators are generators that yield tasks and receive/return any type
Orchestrator = Callable[[OrchestrationContext, TInput], Union[Generator[Task, Any, Any], TOutput]]
Orchestrator = Callable[[OrchestrationContext, TInput], Union[Generator[Task[Any], Any, TOutput], TOutput]]

# Activities are simple functions that can be scheduled by orchestrators
Activity = Callable[[ActivityContext, TInput], TOutput]
Expand Down
4 changes: 2 additions & 2 deletions 4 durabletask/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def __init__(self):
self.entities = {}
self.entity_instances = {}

def add_orchestrator(self, fn: task.Orchestrator) -> str:
def add_orchestrator(self, fn: task.Orchestrator[TInput, TOutput]) -> str:
if fn is None:
raise ValueError("An orchestrator function argument is required.")

Expand All @@ -166,7 +166,7 @@ def add_named_orchestrator(self, name: str, fn: task.Orchestrator) -> None:

self.orchestrators[name] = fn

def get_orchestrator(self, name: str) -> Optional[task.Orchestrator]:
def get_orchestrator(self, name: str) -> Optional[task.Orchestrator[Any, Any]]:
return self.orchestrators.get(name)

def add_activity(self, fn: task.Activity) -> str:
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.