Skip to content
This repository was archived by the owner on Nov 10, 2017. It is now read-only.
/ example-worker Public archive

Taskcluster example worker with no actually useful functionality outside of some docs and a "getting started

Notifications You must be signed in to change notification settings

taskcluster/example-worker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

example-worker

Goals:

  • Show usage of the taskcluster client

  • "Claim" particular tasks based on their task id and then mark them completed logging a message in stdout.

The taskcluster example worker demonstrates the API usage and workflow of a taskcluster worker. The workflow of the example worker is:

  • Instantiate taskcluster queue
  • Get connection string for AMQP queue
  • Instantiate listener
  • Instantiate QueueEvents (for controlling which events to listen for)
  • Use QueueEvents to bind listener to events corresponding to pending tasks
  • Create event handler for events corresponding to pending tasks
  • Start listening process.
    • (Create a task -- in a production environment, a developer will submit a task-graph to the scheduler and the scheduler will create a task on the queue. To keep this worker simple, it creates a task itself).
    • Claim task
    • Report task as completed

Developing

npm install
node server.js

About

Taskcluster example worker with no actually useful functionality outside of some docs and a "getting started

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published