Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
Update create_http_task.py [(#2187)](GoogleCloudPlatform/python-docs-…
Browse files Browse the repository at this point in the history
…samples#2187)

Updates `create_http_task.py` to have missing `in_seconds` variable
  • Loading branch information
avoorhees authored and gguuss committed Oct 1, 2019
1 parent 74e4dd6 commit 23532a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion samples/snippets/create_http_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def create_http_task(project,
# location = 'us-central1'
# url = 'https://example.com/task_handler'
# payload = 'hello'
in_seconds = 10

# Construct the fully qualified queue name.
parent = client.queue_path(project, location, queue)
Expand All @@ -56,7 +57,6 @@ def create_http_task(project,

# Add the payload to the request.
task['http_request']['body'] = converted_payload

if in_seconds is not None:
# Convert "seconds from now" into an rfc3339 datetime string.
d = datetime.datetime.utcnow() + datetime.timedelta(seconds=in_seconds)
Expand Down

0 comments on commit 23532a8

Please sign in to comment.