We need to pass context info in onTick function the way this is implemented in setInterval, any support for this.
Hmm. I can see this being useful. The tradeoff is that you do not get to call this.stop() from within the callback. I think this is probably fine.
It will default to calling the onComplete function within the scope of the job.
Specify context for onComplete.
It seems to be a nice feature that the oncomplete method be allowed to
have a specific context within which to execute (GH-47).
Signed-off-by: Nick Campbell <firstname.lastname@example.org>
I've got one other feature I want to work out before pushing a new version. Once that is done I'll publish. For now you can use the code from master to accomplish what you want.
Also, I just noticed that I called it onComplete in the in the commit and comment...that is just what it is called internally in the code. The tests are for the onTick function.
This has been published to npm in v1.0.1.
Great ... thanks...