Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Passing context info in onTick function #47

Closed
ibansal opened this Issue · 4 comments

2 participants

@ibansal

We need to pass context info in onTick function the way this is implemented in setInterval, any support for this.

@ncb000gt
Owner

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.

Thoughts?

@ncb000gt ncb000gt referenced this issue from a commit
@ncb000gt 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 <nicholas.j.campbell@gmail.com>
41bd4f3
@ncb000gt
Owner

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.

@ncb000gt ncb000gt closed this
@ncb000gt
Owner

This has been published to npm in v1.0.1.

@ibansal

Great ... thanks...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.