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

Method start

gunicorn/ctl/server.py:103–113  ·  view source on GitHub ↗

Start server in background thread with asyncio event loop.

(self)

Source from the content-addressed store, hash-verified

101 _register_fork_handlers()
102
103 def start(self):
104 """Start server in background thread with asyncio event loop."""
105 if self._running:
106 return
107
108 self._running = True
109 self._thread = threading.Thread(target=self._run_loop, daemon=True)
110 self._thread.start()
111
112 # Track this server for fork handling
113 _active_servers.add(self)
114
115 def stop(self):
116 """Stop server and cleanup socket."""

Callers 15

test_start_stopMethod · 0.95
test_show_workersMethod · 0.95
test_show_statsMethod · 0.95
test_help_commandMethod · 0.95
test_worker_addMethod · 0.95
test_invalid_commandMethod · 0.95
init_processMethod · 0.45

Calls 1

addMethod · 0.80

Tested by 11

test_start_stopMethod · 0.76
test_show_workersMethod · 0.76
test_show_statsMethod · 0.76
test_help_commandMethod · 0.76
test_worker_addMethod · 0.76
test_invalid_commandMethod · 0.76