From 0fdbdbf85050c6483fe291e0fdc0d89365a0529f Mon Sep 17 00:00:00 2001 From: Averi Kitsch Date: Tue, 9 Aug 2022 04:12:17 -0700 Subject: [PATCH] docs(sample): update protobuf in create_http_task.py (#283) --- .../google-cloud-tasks/samples/snippets/create_http_task.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-tasks/samples/snippets/create_http_task.py b/packages/google-cloud-tasks/samples/snippets/create_http_task.py index 13057fa8c5ea..a789c4eeece7 100644 --- a/packages/google-cloud-tasks/samples/snippets/create_http_task.py +++ b/packages/google-cloud-tasks/samples/snippets/create_http_task.py @@ -90,7 +90,8 @@ def create_http_task( if deadline is not None: # Add dispatch deadline for requests sent to the worker. duration = duration_pb2.Duration() - task["dispatch_deadline"] = duration.FromSeconds(deadline) + duration.FromSeconds(deadline) + task["dispatch_deadline"] = duration # Use the client to build and send the task. response = client.create_task(request={"parent": parent, "task": task})