-
Notifications
You must be signed in to change notification settings - Fork 181
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
QUESTION: Is graceful shutdown possible? #654
Comments
Based on this comment you should be able to inject |
Yes, you can use the application lifetime to get notified, but we're actively working on enhancements to enable a behavior that puts the app into a @nzthiago will be posting updates on this as we reach preview/GA states. |
@fabiocav Is there somewhere we can follow to see what's currently being worked on somewhere specifically these updates will be published? |
I just created this entry on the host repo that you can follow for updates Azure/azure-functions-host#7772 It's a mostly internal implementation but we'll make sure to update the CancellationToken documentation with an example as well. |
Please note that at the moment the .NET isolated (i.e., out of process worker) doesn't have Cancellation Token support. To be surfaced to the .NET isolated worker this depends on a host update related to this feature Azure/azure-functions-host#7785, and requires further design decisions and prioritization, so for now the documentation here is up to date. Note that even though the cancellation token isn't flowing into the out of proc function, a graceful period should still be given to your function as per this work in Consumption and Premium plans. |
Is it possible to know when a function is about to be terminated by the runtime to perform a graceful shutdown?
It would be good to be able to get a notification of when this about to happen and do some logging at a bare minimum.
Thank you 😃
The text was updated successfully, but these errors were encountered: