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

Method worker_class

gunicorn/config.py:119–130  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

117
118 @property
119 def worker_class(self):
120 uri = self.settings['worker_class'].get()
121
122 # are we using a threaded worker?
123 is_sync = isinstance(uri, str) and (uri.endswith('SyncWorker') or uri == 'sync')
124 if is_sync and self.threads > 1:
125 uri = "gunicorn.workers.gthread.ThreadWorker"
126
127 worker_class = util.load_class(uri)
128 if hasattr(worker_class, "setup"):
129 worker_class.setup()
130 return worker_class
131
132 @property
133 def address(self):

Callers 1

spawn_workerMethod · 0.80

Calls 2

getMethod · 0.45
setupMethod · 0.45

Tested by

no test coverage detected