(self)
| 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): |
no test coverage detected