Celery v0.3.2 (unstable) documentation

Platform Specific - celery.platform

celery.platform

class celery.platform.PIDFile(pidfile)

Manages a pid file.

check()

Check the status of the pidfile.

If the pidfile exists, and the process is not running, it will remove the stale pidfile and continue as normal. If the process is running, it will exit the program with an error message.

get_pid()
Get the process id stored in the pidfile.
remove()
Remove the pidfile.
write(pid=None)

Write a pidfile.

If pid is not specified the pid of the current process will be used.

celery.platform.daemonize(pidfile)
Detach a process from the controlling terminal and run it in the background as a daemon.
celery.platform.remove_pidfile(pidfile)
Remove the pidfile.