TritonDataCenter / node-workflow

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

backend.updateJobProperty VS _updateJobProperty (in combination with node-workflow-pg-backend) #142

Closed aars closed 9 years ago

aars commented 9 years ago

lib/job-runner.js implements a wrapper function for backend.updateJobProperty that allows omitting the meta parameter. Here: https://github.com/joyent/node-workflow/blob/master/lib/job-runner.js#L109

lib/runner.js does not have this wrapper function and breaks on retrying jobs since no callback parameter is given.

This could be fixed in the node-workflow-pg-backend, since node-workflow-redis-backend does so as well (https://github.com/kusor/node-workflow-redis-backend/blob/master/lib/workflow-redis-backend.js#L843). I will submit a PR to that project.

But, there is code in this project that tries to handle this. Should remove this behaviour from this project and depend on the backend to handle this?