Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update create_http_task.py #2187

Merged
merged 2 commits into from
Oct 1, 2019
Merged
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
2 changes: 1 addition & 1 deletion tasks/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