Skip to content

Commit 169a092

Browse files
authored
fix(samples): remove unused variables (#492)
1 parent 7c23593 commit 169a092

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

cloud-tasks/createHttpTask.js

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ function main(
4444
// const location = 'us-central1';
4545
// const url = 'https://example.com/taskhandler';
4646
// const payload = 'Hello, World!';
47+
// const inSeconds = 180;
4748

4849
// Construct the fully qualified queue name.
4950
const parent = client.queuePath(project, location, queue);

cloud-tasks/createHttpTaskWithToken.js

+1-9
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ function main(
2828
location = 'us-central1', // The GCP region of your queue
2929
url = 'https://example.com/taskhandler', // The full url path that the request will be sent to
3030
serviceAccountEmail = 'client@<project-id>.iam.gserviceaccount.com', // Cloud IAM service account
31-
payload = 'Hello, World!', // The task HTTP request body
32-
inSeconds = 0 // Delay in task execution
31+
payload = 'Hello, World!' // The task HTTP request body
3332
) {
3433
// [START cloud_tasks_create_http_task_with_token]
3534
// Imports the Google Cloud Tasks library.
@@ -64,13 +63,6 @@ function main(
6463
task.httpRequest.body = Buffer.from(payload).toString('base64');
6564
}
6665

67-
if (inSeconds) {
68-
// The time when the task is scheduled to be attempted.
69-
task.scheduleTime = {
70-
seconds: inSeconds + Date.now() / 1000,
71-
};
72-
}
73-
7466
console.log('Sending task:');
7567
console.log(task);
7668
// Send create task request.

0 commit comments

Comments
 (0)