This document describes an older version of Celery (2.1). For the latest stable version please go here.

Platform Specific - celery.platforms

class celery.platforms.DaemonContext(pidfile=None, working_directory='/', umask=0, **kwargs)
close()
detach()
open()
exception celery.platforms.LockFailed
class celery.platforms.PIDFile(path)
acquire()
is_locked()
read_pid()
release()
remove()
remove_if_stale()
write_pid()
celery.platforms.create_daemon_context(logfile=None, pidfile=None, uid=None, gid=None, **options)
celery.platforms.create_pidlock(pidfile)

Create and verify pidfile.

If the pidfile already exists the program exits with an error message, however if the process it refers to is not running anymore, the pidfile is just deleted.

celery.platforms.get_fdmax(default=None)
celery.platforms.ignore_signal(signal_name)

Ignore signal using SIG_IGN.

Does nothing if the platform doesn’t support signals, or the specified signal in particular.

celery.platforms.install_signal_handler(signal_name, handler)

Install a handler.

Does nothing if the current platform doesn’t support signals, or the specified signal in particular.

celery.platforms.parse_gid(gid)

Parse group id.

gid can be an integer (gid) or a string (group name), if a group name the gid is taken from the password file.

celery.platforms.parse_uid(uid)

Parse user id.

uid can be an interger (uid) or a string (username), if a username the uid is taken from the password file.

celery.platforms.reset_signal(signal_name)

Reset signal to the default signal handler.

Does nothing if the platform doesn’t support signals, or the specified signal in particular.

celery.platforms.set_effective_user(uid=None, gid=None)

Change process privileges to new user/group.

If uid and gid is set the effective user/group is set.

If only uid is set, the effective uer is set, and the group is set to the users primary group.

If only gid is set, the effective group is set.

celery.platforms.set_mp_process_title(progname, info=None, hostname=None)

Set the ps name using the multiprocessing process name.

Only works if setproctitle is installed.

celery.platforms.set_process_title(progname, info=None)

Set the ps name for the currently running process.

Only works if setproctitle is installed.

celery.platforms.setegid(gid)

Set effective group id.

celery.platforms.seteuid(uid)

Set effective user id.

celery.platforms.strargv(argv)

Previous topic

Signals: Safe References - celery.utils.dispatch.saferef

Next topic

Change history

This Page