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

Method unlink

gunicorn/pidfile.py:53–62  ·  view source on GitHub ↗

delete pidfile

(self)

Source from the content-addressed store, hash-verified

51 self.create(self.pid)
52
53 def unlink(self):
54 """ delete pidfile"""
55 try:
56 with open(self.fname) as f:
57 pid1 = int(f.read() or 0)
58
59 if pid1 == self.pid:
60 os.unlink(self.fname)
61 except Exception:
62 pass
63
64 def validate(self):
65 """ Validate pidfile and make it stale if needed"""

Callers 15

renameMethod · 0.95
runMethod · 0.80
haltMethod · 0.80
reloadMethod · 0.80
close_socketsFunction · 0.80
_run_asyncMethod · 0.80
_cleanup_workerMethod · 0.80
_cleanup_syncMethod · 0.80
_run_asyncMethod · 0.80
_cleanupMethod · 0.80
__init__Method · 0.80

Calls 1

readMethod · 0.45