diff --git a/cloud-tasks/createQueue.js b/cloud-tasks/createQueue.js index 34b9843532..4f78c9605e 100644 --- a/cloud-tasks/createQueue.js +++ b/cloud-tasks/createQueue.js @@ -14,6 +14,7 @@ 'use strict'; +// [START cloud_tasks_create_queue] /** * Create a new Task Queue */ @@ -45,6 +46,7 @@ async function createQueue( }); console.log(`Created queue ${response.name}`); } +// [END cloud_tasks_create_queue] const args = process.argv.slice(2); createQueue(...args).catch(console.error); diff --git a/cloud-tasks/deleteQueue.js b/cloud-tasks/deleteQueue.js index cadfa11c83..1cedca2760 100644 --- a/cloud-tasks/deleteQueue.js +++ b/cloud-tasks/deleteQueue.js @@ -14,6 +14,7 @@ 'use strict'; +// [START cloud_tasks_delete_queue] /** * Delete a given Queue */ @@ -35,6 +36,7 @@ async function deleteQueue( await client.deleteQueue({name}); console.log(`Deleted queue '${queue}'.`); } +// [END cloud_tasks_delete_queue] const args = process.argv.slice(2); deleteQueue(...args).catch(console.error); diff --git a/cloud-tasks/listQueues.js b/cloud-tasks/listQueues.js index 530d4b4ee1..b4f23fdba9 100644 --- a/cloud-tasks/listQueues.js +++ b/cloud-tasks/listQueues.js @@ -14,6 +14,7 @@ 'use strict'; +// [START cloud_tasks_list_queues] async function listQueues( project = 'my-project-id', // Your GCP Project id location = 'us-central1' // The GCP region to search for queues @@ -39,6 +40,7 @@ async function listQueues( console.log('No queues found!'); } } +// [END cloud_tasks_list_queues] const args = process.argv.slice(2); listQueues(...args).catch(console.error);