-
Notifications
You must be signed in to change notification settings - Fork 272
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
Long running durable timers #1390
Conversation
src/WebJobs.Extensions.DurableTask/AzureStorageDurabilityProvider.cs
Outdated
Show resolved
Hide resolved
src/WebJobs.Extensions.DurableTask/ContextImplementations/DurableOrchestrationContext.cs
Outdated
Show resolved
Hide resolved
src/WebJobs.Extensions.DurableTask/ContextImplementations/DurableOrchestrationContext.cs
Show resolved
Hide resolved
The tests, |
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 is looking great. Can we add a test or two to validate the behavior?
src/WebJobs.Extensions.DurableTask/ContextImplementations/DurableOrchestrationContext.cs
Show resolved
Hide resolved
src/WebJobs.Extensions.DurableTask/ContextImplementations/DurableOrchestrationContext.cs
Outdated
Show resolved
Hide resolved
This is exactly what I needed. I have things to schedule that may be every 7 days, 14 days, 4 weeks, or 6 weeks. I'd love for this to be merged yesterday 😛 |
Oh yes, was just implementing a complicated (to me) while loop to crank more than 7 days out of durable timers. This makes me really happy. Will there be a new maximum delay implemented ? Keep up the good work, thanks ! |
Glad to hear that @jedjohan! No, there isn't a new maximum delay. If a timer is scheduled for longer than the maximum delay, then a new timer is scheduled every three days until the difference is less than three days. This ensures that users won't have to worry about staying within a maximum time. |
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.
A few pieces to cleanup, but the PR is shaping up nicely!
src/WebJobs.Extensions.DurableTask/Listener/OutOfProcOrchestrationShim.cs
Show resolved
Hide resolved
test/FunctionsV2/AzureStorageModifiedDurabilityProviderFactory.cs
Outdated
Show resolved
Hide resolved
src/WebJobs.Extensions.DurableTask/ContextImplementations/DurableOrchestrationContext.cs
Outdated
Show resolved
Hide resolved
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!
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.
Just a few non-blocking suggestions, but I think this is ready to be merged when you feel ready!
src/WebJobs.Extensions.DurableTask/ContextImplementations/DurableOrchestrationContext.cs
Outdated
Show resolved
Hide resolved
Can't wait for this to be merged. 🤩 |
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, just look into that last comment I made.
These changes allow durable timers to run longer than 7 days and resolves #14 .
Durable timer messages use queue messages which don't last longer than 7 days. To get around this, if a timer is scheduled for longer than 7 days, then the timer will go off every 3 days until the difference between the current time and the scheduled time is less than 3 days.