Module Expr Str ImportFrom alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias If NameLoad body ImportFrom alias FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call NameLoad NameLoad NameLoad TryExcept body Return Call NameLoad Call NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str Return NameLoad Raise decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults kwarg body Expr Str If UnaryOpNot NameLoad body Raise Call NameLoad Str Expr Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword Call AttributeLoad NameLoad attr BinOpAdd AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults AttributeLoad NameLoad attr body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad If CompareIs NameLoad NameLoad body Return NameLoad TryExcept body Expr Call NameLoad NameLoad NameLoad NameLoad Return NameLoad handlers ExceptHandler type NameLoad name NameStore body If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad orelse If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str NameLoad Return NameLoad Raise decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad If CompareIs NameLoad NameLoad body Return NameLoad TryExcept body Expr Call NameLoad NameLoad Num NameLoad Expr Call AttributeLoad NameLoad attr Str Return NameLoad handlers ExceptHandler type NameLoad name NameStore body If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad orelse If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str NameLoad Return NameLoad Raise decorator_list
N/A N/A This module defines helpers for running and managing daemonized services __future__ absolute_import N/A errno N/A logging N/A os N/A signal sparts.deps HAS_DAEMONIZE sparts.fileutils readfile N/A HAS_DAEMONIZE N/A daemonize Daemonize _using_pidfile N/A N/A pidfile logger N/A N/A N/A Log what `pidfile` we'll be using to `logger` N/A N/A N/A logger info Using lockfile at '%s'... pidfile N/A read_pid N/A N/A pidfile logger N/A N/A N/A Returns the pid in `pidfile` or None if the file doesn't exist. N/A N/A _using_pidfile pidfile logger N/A N/A N/A N/A int N/A readfile pidfile N/A N/A N/A IOError N/A e N/A N/A N/A N/A e errno N/A errno ENOENT N/A N/A N/A N/A logger info Daemon not running (no lockfile) N/A None N/A N/A send_signal N/A N/A pid signum logger N/A N/A N/A Sends signal `signum` to `pid`, logging messages to `logger` N/A N/A N/A logger info Sending signal %d to PID %d... signum pid N/A N/A N/A os kill pid signum N/A daemonize N/A N/A command name pidfile logger N/A kwargs N/A N/A Daemonizes the `command` function.
    
    Uses `name` for syslogging, `pidfile` for the pid file, and logs messages
    to `logger` or a child logger of logger as appropriate.
     N/A N/A HAS_DAEMONIZE N/A N/A N/A Exception Need `daemonize` to run as daemon N/A N/A _using_pidfile pidfile logger N/A daemon N/A Daemonize app name pid pidfile action command logger N/A N/A logging getLogger N/A N/A logger name .daemon kwargs N/A N/A N/A daemon start N/A kill N/A N/A pidfile logger signum N/A N/A signal SIGTERM N/A N/A Sends `signum` to the pid specified by `pidfile`.

    Logs messages to `logger`.  Returns True if the process is not running,
    or signal was sent successfully.  Returns False if the process for the
    pidfile was running and there was an error sending the signal. N/A daemon_pid N/A read_pid pidfile logger N/A N/A daemon_pid None N/A N/A True N/A N/A N/A N/A send_signal daemon_pid signum logger N/A True N/A N/A N/A OSError N/A e N/A N/A N/A N/A e errno N/A errno ESRCH N/A N/A N/A N/A logger warning Daemon not running (Stale lockfile) N/A N/A N/A os remove pidfile N/A True N/A N/A N/A N/A e errno N/A errno EPERM N/A N/A N/A N/A logger error Unable to kill %d (EPERM) daemon_pid N/A False N/A N/A status N/A N/A pidfile logger N/A N/A N/A Checks to see if the process for the pid in `pidfile` is running.

    Logs messages to `logger`.  Returns True if there is a program for the
    running pid.  Returns False if not or if there was an error
    polling the pid. N/A daemon_pid N/A read_pid pidfile logger N/A N/A daemon_pid None N/A N/A False N/A N/A N/A N/A send_signal daemon_pid 0 logger N/A N/A N/A logger info Daemon is alive N/A True N/A N/A N/A OSError N/A e N/A N/A N/A N/A e errno N/A errno ESRCH N/A N/A N/A N/A logger warning Daemon not running (Stale lockfile) N/A N/A N/A os remove pidfile N/A False N/A N/A N/A N/A e errno N/A errno EPERM N/A N/A N/A N/A logger error Unable to poll %d (EPERM) daemon_pid N/A False N/A N/A