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

Method halt

gunicorn/arbiter.py:373–388  ·  view source on GitHub ↗

halt arbiter

(self, reason=None, exit_status=0)

Source from the content-addressed store, hash-verified

371 self.SIG_QUEUE.put_nowait(self.WAKEUP_REQUEST)
372
373 def halt(self, reason=None, exit_status=0):
374 """ halt arbiter """
375 # Stop control socket server first
376 self._stop_control_server()
377
378 self.stop()
379
380 log_func = self.log.info if exit_status == 0 else self.log.error
381 log_func("Shutting down: %s", self.master_name)
382 if reason is not None:
383 log_func("Reason: %s", reason)
384
385 if self.pidfile is not None:
386 self.pidfile.unlink()
387 self.cfg.on_exit(self)
388 sys.exit(exit_status)
389
390 def wait_for_signals(self, timeout=1.0):
391 """\

Callers 1

runMethod · 0.95

Calls 4

_stop_control_serverMethod · 0.95
stopMethod · 0.95
unlinkMethod · 0.80
on_exitMethod · 0.80

Tested by

no test coverage detected