Skip to content

Commit 5984c41

Browse files
Benjamin E. Coeyoshi-automation
authored andcommitted
docs: update to useful quickstart
docs: update to useful quickstart * adds a quickstart that does more than simply pull in the library. * demonstrates the new `sample-metadata:` stanza we can provide in samples. - [x] Tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) CC: @steffnay #78 automerged by dpebot
1 parent f83fb87 commit 5984c41

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

scheduler/createJob.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
* limitations under the License.
1414
*/
1515

16+
// sample-metadata:
17+
// title: Create Job
18+
// description: Create a job that posts to /log_payload on an App Engine service.
19+
// usage: node createJob.js [project-id] [location-id] [app-engine-service-id]
20+
1621
/**
1722
* Create a job with an App Engine target via the Cloud Scheduler API
1823
*/
@@ -57,4 +62,7 @@ async function createJob(projectId, locationId, serviceId) {
5762
}
5863

5964
const args = process.argv.slice(2);
60-
createJob(...args).catch(console.error);
65+
createJob(...args).catch(err => {
66+
console.error(err.message);
67+
process.exitCode = 1;
68+
});

0 commit comments

Comments
 (0)