rattail.filemon.linux

File Monitor for Linux

class rattail.filemon.linux.EventHandler(pevent=None, **kargs)[source]

Event processor for file monitor daemon. This receives notifications of file system events, and places new files on the queue as appropriate.

my_init(profile=None, **kwargs)[source]

This method is called from ProcessEvent.__init__(). This method is empty here and must be redefined to be useful. In effect, if you need to specifically initialize your subclass’ instance then you just have to override this method in your subclass. Then all the keyworded arguments passed to ProcessEvent.__init__() will be transmitted as parameters to this method. Beware you MUST pass keyword arguments though.

@param kargs: optional delegated arguments from __init__(). @type kargs: dict

class rattail.filemon.linux.FileMonitorDaemon(pidfile, config=None, stdin='/dev/null', stdout='/dev/null', stderr='/dev/null')[source]

Linux daemon implementation of the File Monitor.

run()[source]

You should override this method when you subclass Daemon. It will be called after the process has been daemonized by start() or restart().

rattail.filemon.linux.get_daemon(config, pidfile=None)[source]

Get a FileMonitorDaemon instance.

rattail.filemon.linux.start_daemon(config, pidfile=None, daemonize=False)[source]

Start the file monitor daemon.

rattail.filemon.linux.stop_daemon(config, pidfile=None)[source]

Stop the file monitor daemon.