Skip to content
Merged
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
3 changes: 2 additions & 1 deletion durabletask/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ def call_activity(self, activity: Union[Activity[TInput, TOutput], str], *,
pass

@abstractmethod
def call_entity(self, entity: EntityInstanceId,
def call_entity(self,
entity: EntityInstanceId,
operation: str,
input: Optional[TInput] = None) -> Task:
"""Schedule entity function for execution.
Expand Down
8 changes: 4 additions & 4 deletions durabletask/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1038,28 +1038,28 @@ def call_activity(

def call_entity(
self,
entity_id: EntityInstanceId,
entity: EntityInstanceId,
operation: str,
input: Optional[TInput] = None,
) -> task.Task:
id = self.next_sequence_number()

self.call_entity_function_helper(
id, entity_id, operation, input=input
id, entity, operation, input=input
Comment on lines 1047 to +1048
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency and maintainability, the helper function call_entity_function_helper should have its parameter name updated from entity_id (line 1155) to entity to match the public method parameter name. While the code works because arguments are passed positionally, this naming inconsistency can cause confusion during maintenance.

Copilot uses AI. Check for mistakes.
)

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

def signal_entity(
self,
entity_id: EntityInstanceId,
operation: str,
operation_name: str,
input: Optional[TInput] = None
) -> None:
id = self.next_sequence_number()

self.signal_entity_function_helper(
id, entity_id, operation, input
id, entity_id, operation_name, input
Comment on lines 1061 to +1062
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency and maintainability, the helper function signal_entity_function_helper should have its parameter name updated from operation (line 1178) to operation_name to match the public method parameter name. While the code works because arguments are passed positionally, this naming inconsistency can cause confusion during maintenance.

Copilot uses AI. Check for mistakes.
)

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