diff --git a/tasks/create_http_task.py b/tasks/create_http_task.py index eb1a446fc9d8..517ab264a053 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,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)