Skip to content

Instantly share code, notes, and snippets.

@Stephenitis
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Stephenitis/d6b4deb4fcbf2c6b3d0f to your computer and use it in GitHub Desktop.
Save Stephenitis/d6b4deb4fcbf2c6b3d0f to your computer and use it in GitHub Desktop.
runtime 'node'
stack 'node-0.10'
exec 'main_worker.js'
dir '../models'
dir '../config'
dir '../node_modules'
dir '../lib'
dir '../jobs'
dir '../main_worker'
name 'MainWorker'
@Stephenitis
Copy link
Author

{
configuration: {
// configuration holds sensitive variables
// such as redis credentials, cdn access codes, etc.
},
jobName: "",
// The name of the job we want to run
// MainWorker understands which jobs are acceptable
// and can reject jobs and notify us immediatly on inadequate jobNames
source: "",
// source is the originator of the request.
// This helps prevent unwanted scheduling situations.
// An example is preventing our API application
// from scheduling the job that sends out invoices at the end of the month.
// That job is reserved for IronWorker's internal scheduler.
jobPayload: {
// the payload to be handled by the job, such as model ids and other values.
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment