Skip to content
DevelopmentIL edited this page Dec 6, 2012 · 5 revisions

Task Class

Methods

Constructor(job, [parentTask])

Create a task object based on job function. If parent task given, the job will execute only after the parent task was done.

  • job - function(callback)
  • parentTask - Task Object

done(callback)

Call the callback with the job result when the job is done.

  • callback - function

stop()

Stop the task while it running. All the results will be set with error.

run(callback)

Run the task, call the callback with the job result when the job is done.

  • callback - function
Clone this wiki locally