Skip to content

Commit

Permalink
docs: update to useful quickstart
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bcoe authored and Ace Nassri committed Nov 15, 2022
1 parent dec6c18 commit 251f3ef
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion scheduler/createJob.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
* limitations under the License.
*/

// sample-metadata:
// title: Create Job
// description: Create a job that posts to /log_payload on an App Engine service.
// usage: node createJob.js [project-id] [location-id] [app-engine-service-id]

/**
* Create a job with an App Engine target via the Cloud Scheduler API
*/
Expand Down Expand Up @@ -57,4 +62,7 @@ async function createJob(projectId, locationId, serviceId) {
}

const args = process.argv.slice(2);
createJob(...args).catch(console.error);
createJob(...args).catch(err => {
console.error(err.message);
process.exitCode = 1;
});

0 comments on commit 251f3ef

Please sign in to comment.