Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control Information for timer #15

Open
sukrit007 opened this issue Feb 24, 2014 · 1 comment
Open

Control Information for timer #15

sukrit007 opened this issue Feb 24, 2014 · 1 comment

Comments

@sukrit007
Copy link
Contributor

Refer
https://github.com/neyric/aws-swf/blob/master/lib/decision-response.js#L262

The start_timer method uses the "name" parameter as control information. Instead, we should call it "control". Reason: We can add a JSON message to this parameter, which will enable us to implement different strategies like:
ExponentialBackoff
LinearBackoff
.....

In my current use case, I will be implementing my own exponential strategy for retries, however need to add the state for the same as control information.
http://docs.aws.amazon.com/amazonswf/latest/apireference/API_TimerStartedEventAttributes.html

So that decider can evaluate next delay and fire the timer again.

@toaster33
Copy link

Do you have an example of using the timer? I added the code to my decider and I am not seeing the swfClientMock.respondDecisionTaskCompleted(p, cb) being called. Also, I am not clear on what to set defaultTaskList too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants