File tree 2 files changed +2
-9
lines changed
2 files changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ function main(
44
44
// const location = 'us-central1';
45
45
// const url = 'https://example.com/taskhandler';
46
46
// const payload = 'Hello, World!';
47
+ // const inSeconds = 180;
47
48
48
49
// Construct the fully qualified queue name.
49
50
const parent = client . queuePath ( project , location , queue ) ;
Original file line number Diff line number Diff line change @@ -28,8 +28,7 @@ function main(
28
28
location = 'us-central1' , // The GCP region of your queue
29
29
url = 'https://example.com/taskhandler' , // The full url path that the request will be sent to
30
30
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
33
32
) {
34
33
// [START cloud_tasks_create_http_task_with_token]
35
34
// Imports the Google Cloud Tasks library.
@@ -64,13 +63,6 @@ function main(
64
63
task . httpRequest . body = Buffer . from ( payload ) . toString ( 'base64' ) ;
65
64
}
66
65
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
-
74
66
console . log ( 'Sending task:' ) ;
75
67
console . log ( task ) ;
76
68
// Send create task request.
You can’t perform that action at this time.
0 commit comments