Skip to main content
# Supervisor Event Listeners
A small collection of supervisor event listeners that weren't available in the awesome [superlance](https://github.com/Supervisor/superlance).

## fseventwatcher
```shell
$ fseventwatcher --help
usage: fseventwatcher [-h] [-p [PROGRAM [PROGRAM ...]]] [-a] -f PATH
[PATH ...] [-r]
[--watched-events [{moved,created,deleted,modified} [{moved,created,deleted,modified} ...]]]
[--dither DITHER_MAX]

Supervisor TICK event listener which restarts processes if file system changes
occur between ticks.

optional arguments:
-h, --help show this help message and exit
-p [PROGRAM [PROGRAM ...]], --programs [PROGRAM [PROGRAM ...]]
Supervisor process name/s to be restarted if in
RUNNING state.
-a, --any-program Restart any supervisor processes in RUNNING state.
-f PATH [PATH ...], --paths PATH [PATH ...]
Path to watch for file system events.
-r, --recursive Watch path/s recursively.
--watched-events [{moved,created,deleted,modified} [{moved,created,deleted,modified} ...]]
Specify which file system events to watch, by default
all events will be watched.
--dither DITHER_MAX Add dither before restarting processes. Specify
maximum time to dither in seconds.
```

## eventexec
```shell
$ eventexec --help
usage: eventexec [-h] -e COMMAND [-p [PROGRAM [PROGRAM ...]]] [-a]
[--dither DITHER_MAX]

Supervisor event listener which executes a command when events are received
and optionally restarts processes on non-zero exit status.

optional arguments:
-h, --help show this help message and exit
-e COMMAND, --execute COMMAND
Command or script to execute on supervisor events.
-p [PROGRAM [PROGRAM ...]], --restart-programs [PROGRAM [PROGRAM ...]]
Supervisor process name/s to be restarted on non-zero
exit status if in RUNNING state.
-a, --restart-any-program
Restart any supervisor processes in RUNNING state on
non-zero exit status.
--dither DITHER_MAX Add dither before restarting processes. Specify
maximum time to dither in seconds.
```

## processrestarter
```shell
processrestarter --help
usage: processrestarter [-h] [-p [PROGRAM [PROGRAM ...]]] [-a]
[--dither DITHER_MAX]

Supervisor event listener which restarts processes on TICK events.

optional arguments:
-h, --help show this help message and exit
-p [PROGRAM [PROGRAM ...]], --programs [PROGRAM [PROGRAM ...]]
Supervisor process name/s to be restarted if in
RUNNING state.
-a, --any-program Restart any supervisor processes in RUNNING state.
--dither DITHER_MAX Add dither before restarting processes. Specify
maximum time to dither in seconds.
```

Metadata

Release history Release notifications | RSS feed

This release

0.1 This release

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page