Skip to content

Commit 7bdfbcf

Browse files
authored
Match entity method parameter names (#82)
- Ensure consistency in worker.py to task.py
1 parent 4d2cafa commit 7bdfbcf

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

durabletask/task.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ def call_activity(self, activity: Union[Activity[TInput, TOutput], str], *,
139139
pass
140140

141141
@abstractmethod
142-
def call_entity(self, entity: EntityInstanceId,
142+
def call_entity(self,
143+
entity: EntityInstanceId,
143144
operation: str,
144145
input: Optional[TInput] = None) -> Task:
145146
"""Schedule entity function for execution.

durabletask/worker.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,28 +1039,28 @@ def call_activity(
10391039

10401040
def call_entity(
10411041
self,
1042-
entity_id: EntityInstanceId,
1042+
entity: EntityInstanceId,
10431043
operation: str,
10441044
input: Optional[TInput] = None,
10451045
) -> task.Task:
10461046
id = self.next_sequence_number()
10471047

10481048
self.call_entity_function_helper(
1049-
id, entity_id, operation, input=input
1049+
id, entity, operation, input=input
10501050
)
10511051

10521052
return self._pending_tasks.get(id, task.CompletableTask())
10531053

10541054
def signal_entity(
10551055
self,
10561056
entity_id: EntityInstanceId,
1057-
operation: str,
1057+
operation_name: str,
10581058
input: Optional[TInput] = None
10591059
) -> None:
10601060
id = self.next_sequence_number()
10611061

10621062
self.signal_entity_function_helper(
1063-
id, entity_id, operation, input
1063+
id, entity_id, operation_name, input
10641064
)
10651065

10661066
def lock_entities(self, entities: list[EntityInstanceId]) -> task.Task[EntityLock]:

0 commit comments

Comments
 (0)