From 76092ef5b8a54b2371a6434831f0aa3af73bcf23 Mon Sep 17 00:00:00 2001 From: Alex Voorhees Date: Mon, 3 Jun 2019 11:58:55 -0500 Subject: [PATCH 1/2] Update create_http_task.py Added missing `in_seconds` variable --- tasks/create_http_task.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks/create_http_task.py b/tasks/create_http_task.py index eb1a446fc9d..d32b4791dbe 100644 --- a/tasks/create_http_task.py +++ b/tasks/create_http_task.py @@ -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) @@ -56,7 +57,7 @@ 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) From 1fcd07958c01fb1a5f0645d5042e003a155fddd8 Mon Sep 17 00:00:00 2001 From: Alex Voorhees Date: Tue, 1 Oct 2019 08:55:16 -0500 Subject: [PATCH 2/2] Update create_http_task.py Removed extra whitespace --- tasks/create_http_task.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tasks/create_http_task.py b/tasks/create_http_task.py index d32b4791dbe..517ab264a05 100644 --- a/tasks/create_http_task.py +++ b/tasks/create_http_task.py @@ -57,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)