MCPcopy
hub / github.com/celery/celery / _create_pidlock

Function _create_pidlock

celery/platforms.py:266–272  ·  view source on GitHub ↗
(pidfile)

Source from the content-addressed store, hash-verified

264
265
266def _create_pidlock(pidfile):
267 pidlock = Pidfile(pidfile)
268 if pidlock.is_locked() and not pidlock.remove_if_stale():
269 print(PIDLOCKED.format(pidfile, pidlock.read_pid()), file=sys.stderr)
270 raise SystemExit(EX_CANTCREAT)
271 pidlock.acquire()
272 return pidlock
273
274
275def fd_by_path(paths):

Callers 2

create_pidlockFunction · 0.85
after_chdir_doFunction · 0.85

Calls 6

is_lockedMethod · 0.95
remove_if_staleMethod · 0.95
read_pidMethod · 0.95
acquireMethod · 0.95
PidfileClass · 0.85
formatMethod · 0.45

Tested by

no test coverage detected