Skip to content
This repository

Task Class 

DevelopmentIL edited this page · 5 revisions

Pages 2

Clone this wiki locally

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
Something went wrong with that request. Please try again.