Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
fix(samples): remove unused variables (#492)
Browse files Browse the repository at this point in the history
  • Loading branch information
averikitsch authored Dec 21, 2020
1 parent 8793f9a commit 81c4b4e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
1 change: 1 addition & 0 deletions samples/createHttpTask.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
10 changes: 1 addition & 9 deletions samples/createHttpTaskWithToken.js
Original file line number Diff line number Diff line change
Expand Up @@ -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@<project-id>.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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 81c4b4e

Please sign in to comment.