Skip to content
Alexey Kuksin edited this page Dec 2, 2015 · 1 revision

E.g. exitCode = runQueue(stepInstance, cursorQueue)

Parameters

  • step: current step instance
  • cursorQueue: queue of cursors

Key Variables

  • job: job pulled from cursorQueue (of the form task.taskName.step.stepName.cur.cursor)
  • jobsplit: list storing the job split by "."
  • exitCode: exitCode of running the ACTION
  • taskId: task name
  • stepId: step name
  • ACTION: step's action

Functionality

RunQueue gets the next job from the cursorQueue, splits it on "." and stores the pieces in a list in jobsplit. It initializes the exitCode to 0, and extracts the pieces of interest from the jobsplit list (task name, step name, and cursor). The ACTION is retrieved from the configuration file, and the exitCode is set equal to the return value of calling eval on the step's ACTION, passing in the appropriate parameters (ACTION is currently runShell, so the parameters are the task name, step name, and cursor).

If the exitCode is 1, the step has failed, and the cursor is appended to the step's cursorFail list. The exitCode is returned.

Except Statement

In the case of an error, the date, queue job that failed, and the error message are recorded in the log file.

The function returns 1.

Return Value

Returns the exitCode.