diff --git a/samples/createHttpTask.js b/samples/createHttpTask.js index a43b15a9..a9918111 100644 --- a/samples/createHttpTask.js +++ b/samples/createHttpTask.js @@ -44,6 +44,7 @@ function main( // const location = 'us-central1'; // const url = 'https://example.com/taskhandler'; // const payload = 'Hello, World!'; + // const inSeconds = 180; // Construct the fully qualified queue name. const parent = client.queuePath(project, location, queue); diff --git a/samples/createHttpTaskWithToken.js b/samples/createHttpTaskWithToken.js index 0c8380ed..804509a3 100644 --- a/samples/createHttpTaskWithToken.js +++ b/samples/createHttpTaskWithToken.js @@ -28,8 +28,7 @@ function main( location = 'us-central1', // The GCP region of your queue url = 'https://example.com/taskhandler', // The full url path that the request will be sent to serviceAccountEmail = 'client@.iam.gserviceaccount.com', // Cloud IAM service account - payload = 'Hello, World!', // The task HTTP request body - inSeconds = 0 // Delay in task execution + payload = 'Hello, World!' // The task HTTP request body ) { // [START cloud_tasks_create_http_task_with_token] // Imports the Google Cloud Tasks library. @@ -64,13 +63,6 @@ function main( task.httpRequest.body = Buffer.from(payload).toString('base64'); } - if (inSeconds) { - // The time when the task is scheduled to be attempted. - task.scheduleTime = { - seconds: inSeconds + Date.now() / 1000, - }; - } - console.log('Sending task:'); console.log(task); // Send create task request.