circuits.app.daemon – Application Daemon

Events

class circuits.app.daemon.Daemonize(*args, **kwargs)

Daemonize Event

This event can be fired to notify the Daemon Component to begin the “daemonization” process. This event is (by default) used automatically by the Daemon Component in its “started” Event Handler (This behavior can be overridden).

Arguments: None

class circuits.app.daemon.WritePID(*args, **kwargs)

“WritePID Event

This event can be fired to notify the Daemon Component that is should retrive the current process’s id (pid) and write it out to the configured path in the Daemon Component. This event (by default) is used automatically by the Daemon Component after the Daemonize.

Components

class circuits.app.daemon.Daemon(pidfile, path='/', stdin=None, stdout=None, stderr=None, channel='daemon')

Daemon Component

Parameters:
  • pidfile (str or unicode) – .pid filename
  • stdin (str or unicode) – filename to log stdin
  • stdout (str or unicode) – filename to log stdout
  • stderr (str or unicode) – filename to log stderr

Functions