File tree 3 files changed +6
-0
lines changed
3 files changed +6
-0
lines changed Original file line number Diff line number Diff line change 14
14
15
15
'use strict' ;
16
16
17
+ // [START cloud_tasks_create_queue]
17
18
/**
18
19
* Create a new Task Queue
19
20
*/
@@ -45,6 +46,7 @@ async function createQueue(
45
46
} ) ;
46
47
console . log ( `Created queue ${ response . name } ` ) ;
47
48
}
49
+ // [END cloud_tasks_create_queue]
48
50
49
51
const args = process . argv . slice ( 2 ) ;
50
52
createQueue ( ...args ) . catch ( console . error ) ;
Original file line number Diff line number Diff line change 14
14
15
15
'use strict' ;
16
16
17
+ // [START cloud_tasks_delete_queue]
17
18
/**
18
19
* Delete a given Queue
19
20
*/
@@ -35,6 +36,7 @@ async function deleteQueue(
35
36
await client . deleteQueue ( { name} ) ;
36
37
console . log ( `Deleted queue '${ queue } '.` ) ;
37
38
}
39
+ // [END cloud_tasks_delete_queue]
38
40
39
41
const args = process . argv . slice ( 2 ) ;
40
42
deleteQueue ( ...args ) . catch ( console . error ) ;
Original file line number Diff line number Diff line change 14
14
15
15
'use strict' ;
16
16
17
+ // [START cloud_tasks_list_queues]
17
18
async function listQueues (
18
19
project = 'my-project-id' , // Your GCP Project id
19
20
location = 'us-central1' // The GCP region to search for queues
@@ -39,6 +40,7 @@ async function listQueues(
39
40
console . log ( 'No queues found!' ) ;
40
41
}
41
42
}
43
+ // [END cloud_tasks_list_queues]
42
44
43
45
const args = process . argv . slice ( 2 ) ;
44
46
listQueues ( ...args ) . catch ( console . error ) ;
You can’t perform that action at this time.
0 commit comments