Skip to content

Multiprocess manager, command-line version of python supervisor.

License

Notifications You must be signed in to change notification settings

guyingbo/pyprocs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyprocs

Build Status Python Version Version Format License codecov

Multiprocsess manager, command-line version of python supervisor.

The pyprocs.py command runs multiple processes and then monitor them, restart any child process which exit abnormally.

Installation

pip3 install pyprocs

Usage

usage: pyprocs.py [-h] [-w NUM_WORKERS] [--graceful-timeout SECONDS] [-s]
                  [-t SECONDS] [--fail-threshold SECONDS]
                  ARG [ARG ...]

Multiprocess manager

positional arguments:
  ARG                   program to run

optional arguments:
  -h, --help            show this help message and exit
  -w NUM_WORKERS, --num_workers NUM_WORKERS
                        number of worker processes, default to cpu count
  --graceful-timeout SECONDS
                        seconds to wait before force killing processes
  -s, --sys-executable  use system python executable to run command
  -t SECONDS, --restart-wait SECONDS
                        seconds to wait before restart failed process (exit code
                        != 0)
  --fail-threshold SECONDS
                        process exit within N seconds is also considered as
                        a failure

Examples

python3 -m pyprocs -w 4 --graceful-timeout 10 -s script.py
python3 -m pyprocs sh program.sh

About

Multiprocess manager, command-line version of python supervisor.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages