You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, with these global instances, there should be a way to close the connections on a graceful shutdown, prior to stopping the worker.
Another use-case would be to make sure that all telemetry is flushed before the host is (gracefully) shutting down.
Is there any existing documentation that I missed which would explain how to do this in Python? If not, could you provide guidance on how this should be implemented?
The text was updated successfully, but these errors were encountered:
Is your question related to a specific version? If so, please specify:
The question is not related to a specific version.
What binding does your question apply to, if any? (e.g. Blob Trigger, Event Hub Binding, etc)
HTTP trigger
Question
The best practices for Azure Functions mention that we should reuse global client instances for better performance with connection pooling. One example also demonstrates the use of a global Cosmos client instance as a pattern.
However, with these global instances, there should be a way to close the connections on a graceful shutdown, prior to stopping the worker.
Another use-case would be to make sure that all telemetry is flushed before the host is (gracefully) shutting down.
Is there any existing documentation that I missed which would explain how to do this in Python? If not, could you provide guidance on how this should be implemented?
The text was updated successfully, but these errors were encountered: