Skip to content

Commit ff967f4

Browse files
Fix #178: Send 'queue' field in continue_as_new commands
Changed ContinueAsNew.to_server_command() to send 'queue' instead of 'task_queue' to align with the server protocol field name. The Python dataclass field remains 'task_queue' (Pythonic naming), but the server command now uses 'queue' to match server validation and workflow package expectations. Before: SDK sent 'task_queue', which server validated but workflow package normalizer silently dropped After: SDK sends 'queue', which server validates and workflow package normalizer now captures and applies Part of multi-repo fix for #178. Tests updated to assert 'queue' field. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 61fb424 commit ff967f4

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/durable_workflow/workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def to_server_command(self, task_queue: str) -> dict[str, Any]:
9696
if self.workflow_type is not None:
9797
cmd["workflow_type"] = self.workflow_type
9898
cmd["arguments"] = serializer.envelope(self.arguments)
99-
cmd["task_queue"] = self.task_queue or task_queue
99+
cmd["queue"] = self.task_queue or task_queue
100100
return cmd
101101

102102

tests/test_replay.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,12 +232,12 @@ def test_server_command_shape(self) -> None:
232232
sc = cmd.to_server_command("default-q")
233233
assert sc["type"] == "continue_as_new"
234234
assert sc["workflow_type"] == "other"
235-
assert sc["task_queue"] == "q2"
235+
assert sc["queue"] == "q2"
236236

237237
def test_server_command_defaults(self) -> None:
238238
cmd = ContinueAsNew(arguments=[1])
239239
sc = cmd.to_server_command("default-q")
240-
assert sc["task_queue"] == "default-q"
240+
assert sc["queue"] == "default-q"
241241
assert "workflow_type" not in sc
242242

243243

0 commit comments

Comments
 (0)