TritonDataCenter / node-workflow

Task orchestration, creation and running using NodeJS
MIT License
456 stars 66 forks source link

Add a new 'waiting' status and the ability to resume a job execution from the API #97

Closed cachafla closed 11 years ago

cachafla commented 11 years ago

To allow calling long running external tasks from inside a job task and not depend on polling external dependencies for a lot of time, the following 3 things would allow node-workflow's API clients have better control over the execution of a job:

1) Add a new 'waiting' state to jobs 1) Allow calling the 'cb' callback inside a job task like this: return cb('wait'). It will make the job stop/pause/halt its execution by setting the job state to 'waiting' 2) Allow resuming the job with something like /jobs/uuid/resume

Doing this will eliminate the need for a polling task on jobs that call external RPC actions.

kusor commented 11 years ago

Closing once implemented both into main repo and redis backend