Skip to content

Commit 4a3afe8

Browse files
authored
docs(sample): update protobuf in create_http_task.py (#283)
1 parent 9a993ef commit 4a3afe8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cloud-tasks/snippets/create_http_task.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ def create_http_task(
9090
if deadline is not None:
9191
# Add dispatch deadline for requests sent to the worker.
9292
duration = duration_pb2.Duration()
93-
task["dispatch_deadline"] = duration.FromSeconds(deadline)
93+
duration.FromSeconds(deadline)
94+
task["dispatch_deadline"] = duration
9495

9596
# Use the client to build and send the task.
9697
response = client.create_task(request={"parent": parent, "task": task})

0 commit comments

Comments
 (0)