Module: job

Task runner for npac

Methods

(static) makeCall(jobDesc) → {function}

Make a job function, that will call an asynchronous API endpoint available through the context.

Parameters:
Name Type Description
jobDesc Object

An object, that describe the job to run:

 {
     name: {String} // The name of the executive
     args: {Object} // A dictionary object which holds the actual arguments of the executive to run
 }
Returns:
  • A function that the npac.start() will call, during the runJobs process. It has the standard signature of adapter functions: (ctx: {Object}, next: {Function})

see also: the npac.start process description.

Type
function

(static) makeCallSync(jobDesc) → {function}

Make a job function, that will call an synchronous API endpoint available through the context.

Similar to the makeCall, but the API endpoint is synchronous.

Parameters:
Name Type Description
jobDesc Object

The job descriptor object.

Returns:
  • The job function.
Type
function