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

Method heartbeat

gunicorn/workers/gtornado.py:53–65  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

51 self.alive = False
52
53 def heartbeat(self):
54 if not self.alive:
55 if self.server_alive:
56 if hasattr(self, 'server'):
57 try:
58 self.server.stop()
59 except Exception:
60 pass
61 self.server_alive = False
62 else:
63 for callback in self.callbacks:
64 callback.stop()
65 self.ioloop.stop()
66
67 def init_process(self):
68 # IOLoop cannot survive a fork or be shared across processes

Calls 1

stopMethod · 0.45