-
Notifications
You must be signed in to change notification settings - Fork 525
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
[Docs]: What is the opposite of init_context #3140
Comments
Hi @fanjizhao , See how to use it here: https://docs.nuclio.io/en/stable/reference/runtimes/python/python-reference.html#termination-callback Notes:
|
I really appreciated your answer, which is really helpful. However I found the link you mentioned is different from the one I mentioned, and the document you gave is a little bit newer than the one I used. What is the relation between the two documents? |
@fanjizhao |
After I read the document about the termination callback, I found it's a good answer to my question. However, I noticed the designing philosophy between init_context and the termination callback is not consistent. Can you please introduce the designing considerations from the developers' perspective? |
@fanjizhao what do you mean regarding the design philosophy? The The The best option is to set the termination callback in the |
I mean why don't use the same design for the initializing function and the termination function. For example, init_context and terminate_context functions, or use two functions to set the callbacks, like init_callback and termination_callback. Hope I clarified my meaning. |
Nuclio version checks
Location of the documentation
https://nuclio.io/docs/latest/concepts/best-practices-and-common-pitfalls/
Documentation problem
This document mentions init_context to do some work related to creating db connections, but does not mention any function to handle closing the db connections.
Suggested fix for documentation
Please tell us where to close these resources, like db connections, or what is the best practice to handle such things.
The text was updated successfully, but these errors were encountered: