-
Notifications
You must be signed in to change notification settings - Fork 16
Break long timers into smaller timers #122
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
Conversation
cgillum
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Just a couple small suggestions from me.
client/src/main/java/com/microsoft/durabletask/DurableTaskGrpcWorker.java
Outdated
Show resolved
Hide resolved
client/src/test/java/com/microsoft/durabletask/IntegrationTests.java
Outdated
Show resolved
Hide resolved
kaibocai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, add 2 minnor comments.
| } | ||
|
|
||
| /** | ||
| * Sets the maximum timer interval. If not specified, the default maximum timer interval duration will be used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can mention the current default duration is 3 days.
| while (remainingTime.compareTo(this.maximumTimerInterval) > 0) { | ||
| Instant nextFireAt = this.currentInstant.plus(this.maximumTimerInterval); | ||
| createInstantTimer(this.sequenceNumber++, nextFireAt).await(); | ||
| remainingTime = Duration.between(finalFireAt, this.currentInstant); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar logics should also be added to method createTimer(ZoneDateTime)
cgillum
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (Looks Good To Me)!
Just one minor suggestion which you can choose to incorporate or skip.
client/src/main/java/com/microsoft/durabletask/TaskOrchestrationExecutor.java
Outdated
Show resolved
Hide resolved
|
@kamperiadis Is this released in the SDK? |
Issue describing the changes in this PR
Resolves #114
Currently, we do not support timers longer than 7 days. However, the changes in this PR work around that by breaking up a single long timer into several shorter ones.
Pull request checklist
CHANGELOG.md