MCPcopy
hub / github.com/benoitc/gunicorn / init

Method init

gunicorn/dirty/app.py:98–108  ·  view source on GitHub ↗

Initialize the application. Called once when the dirty worker starts, after the app instance is created. Use this for expensive initialization like loading ML models, establishing database connections, etc. This method is called in the child process after f

(self)

Source from the content-addressed store, hash-verified

96 workers = None
97
98 def init(self):
99 """
100 Initialize the application.
101
102 Called once when the dirty worker starts, after the app instance
103 is created. Use this for expensive initialization like loading
104 ML models, establishing database connections, etc.
105
106 This method is called in the child process after fork, so it's
107 safe to initialize non-fork-safe resources here.
108 """
109
110 def __call__(self, action, *args, **kwargs):
111 """

Callers 2

load_appsMethod · 0.45

Calls

no outgoing calls

Tested by 1