fabtools.require.supervisor¶
Supervisor processes¶
This module provides high-level tools for managing long-running processes using supervisor.
See also
- fabtools.require.supervisor.process(name, **kwargs)[source]¶
Require a supervisor process to be running.
Keyword arguments will be used to build the program configuration file. Some useful arguments are:
- command: complete command including arguments (required)
- directory: absolute path to the working directory
- user: run the process as this user
- stdout_logfile: absolute path to the log file
You should refer to the supervisor documentation for the complete list of allowed arguments.
Note
the default values for the following arguments differs from the supervisor defaults:
- autorestart: defaults to true
- redirect_stderr: defaults to true
Example:
from fabtools import require require.supervisor.process('myapp', command='/path/to/venv/bin/myapp --config production.ini --someflag', directory='/path/to/working/dir', user='alice', stdout_logfile='/path/to/logs/myapp.log', )