Package: watchmenpy
Watchmen (0.0.1)Watchmen is a daemon process manager that for you manage and keep your application online 24/7中文简体|EnglishInstallBuild from source# Clone the repositorygitclonehttps://git.ahriknow.com/ahriknow/watchmenpy.git# Go into the repositorycdwatchmenpy# Install watchmen daemon and cli toolpipinstall-e.Install from pypi# Install watchmen daemonpipinstallwatchmenGetting StartedGenerate config file"" Default is ${HOME}/.watchmen/config.tomlwatchmen -g ""[watchmen]# The engine to use for the watchmen server# Valid values are "sock", "socket", "http", "redis"# sock: Unix socket# socket: TCP socket# http: HTTP Api (Include Web panel)# redis: Redis pub/subengines=["sock"]# The default engine to use for connecting to the watchmen serverengine="sock"# The log directory of the watchmen serverlog_dir="$HOME/.watchmen/logs"# The log level of the watchmen server# Valid values are "debug", "info", "warn", "error". Default is "info"log_level="info"# The standard output of the watchmen server# Default is Nonestdout="$HOME/.watchmen/watchmen.stdout.log"# The standard error of the watchmen server# Default is Nonestderr="$HOME/.watchmen/watchmen.stderr.log"# The pid file of the watchmen server# Default is `$HOME/.watchmen/watchmen.pid`pid="$HOME/.watchmen/watchmen.pid"# The task config file name matching pattern# Default is `^.*\\.(toml|ini|json)$`mat="^.*\\.(toml|ini|json)$"# Tasks cache file, json formatcache="$HOME/.watchmen/cache.json"# Monitor interval for rerun tasks, u64: secondinterval=5[sock]# The unix socket path of the watchmen serverpath="/tmp/watchmen.sock"[socket]host="127.0.0.1"port=1949[http]host="127.0.0.1"port=1997[redis]host="localhost"port=6379username=""password=""queue_index=0queue_name="watchmen"subscribe_channels=["watchmen"]subscribe_name="watchmen"Start watchmen daemonwatchmendTask Config file[[task]]id=1name="Async Task 1"command="command"args=["arg1","arg2"]dir="/path/to/directory"env={key1="value1",key2="value2"}stdin=truestdout="output.txt"stderr="error.txt"task_type={Async={max_restart=2,has_restart=0,started_at=0,stopped_at=0}}[Async Task]id=2name=Async Task 2command=commandargs=arg1 arg2dir=/path/to/directoryenv=key1=value1 key2=value2stdin=truestdout="output.txt"stderr="error.txt"task_type=asyncmax_restart=2[{"id":3,"name":"Async Task 3","command":"command","args":["arg1","arg2"],"dir":"/path/to/directory","env":{},"stdin":true,"stdout":"output.txt","stderr":"error.txt","created_at":0,"task_type":{"Async":{"max_restart":2,"has_restart":0,"started_at":0,"stopped_at":0}}}]Commandwatchmen -husage:watchmen[OPTIONS][COMMAND]Watchmen(Python)isadaemonprocessmanagerthatforyoumanageandkeepyourapplicationonline24/7

options:-h,--helpshowthishelpmessageandexit-c<CONFIG>,--config<CONFIG>Configfilepath.Default:$HOME/.watchmen/config.toml-g<GENERATE>,--generate<GENERATE>Generateconfigfile-e<ENGINE>,--engine<ENGINE>Engineforsendmessage-v,--versionPrintversion

SubCommands:{run,add,reload,start,restart,stop,remove,pause,resume,list}runAddandruntasksaddAddtasksreloadReloadtasksstartStarttasksrestartRestarttasksstopStoptasksremoveRemovetaskspausePausetasksresumeResumetaskslistGettaskslist

See"watchmen COMMAND --help"formoreinformationonaspecificcommand.watchmen run -husage:watchmenrun[OPTIONS]options:-h,--helpshowthishelpmessageandexit-p<PATH>,--path<PATH>Taskconfigdirectory-r<REGEX>,--regex<REGEX>Taskconfigfilenameregexpattern-f<CONFIG>,--config<CONFIG>Taskconfigfile-n<NAME>,--name<NAME>Taskname(unique)-c<COMMAND>,--command<COMMAND>Taskcommand-a<ARGS>[<ARGS>...],--args<ARGS>[<ARGS>...]Taskarguments-d<DIR>,--dir<DIR>Taskworkingdirectory-e<ENV>[<ENV>...],--env<ENV>[<ENV>...]Taskenvironmentvariables-i,--stdinTaskstandardinput-o<STDOUT>,--stdout<STDOUT>Taskstandardoutput-w<STDERR>,--stderr<STDERR>Taskstandarderrorwatchmen add -husage:watchmenadd[OPTIONS]options:-h,--helpshowthishelpmessageandexit-p<PATH>,--path<PATH>Taskconfigdirectory-r<REGEX>,--regex<REGEX>Taskconfigfilenameregexpattern-f<CONFIG>,--config<CONFIG>Taskconfigfile-n<NAME>,--name<NAME>Taskname(unique)-c<COMMAND>,--command<COMMAND>Taskcommand-a<ARGS>[<ARGS>...],--args<ARGS>[<ARGS>...]Taskarguments-d<DIR>,--dir<DIR>Taskworkingdirectory-e<ENV>[<ENV>...],--env<ENV>[<ENV>...]Taskenvironmentvariables-i,--stdinTaskstandardinput-o<STDOUT>,--stdout<STDOUT>Taskstandardoutput-w<STDERR>,--stderr<STDERR>Taskstandarderrorwatchmen reload -husage:watchmenreload[OPTIONS]options:-h,--helpshowthishelpmessageandexit-p<PATH>,--path<PATH>Taskconfigdirectory-r<REGEX>,--regex<REGEX>Taskconfigfilenameregexpattern-f<CONFIG>,--config<CONFIG>Taskconfigfile-n<NAME>,--name<NAME>Taskname(unique)-c<COMMAND>,--command<COMMAND>Taskcommand-a<ARGS>[<ARGS>...],--args<ARGS>[<ARGS>...]Taskarguments-d<DIR>,--dir<DIR>Taskworkingdirectory-e<ENV>[<ENV>...],--env<ENV>[<ENV>...]Taskenvironmentvariables-i,--stdinTaskstandardinput-o<STDOUT>,--stdout<STDOUT>Taskstandardoutput-w<STDERR>,--stderr<STDERR>Taskstandarderrorwatchmen start -husage:watchmenstart[OPTIONS]options:-h,--helpshowthishelpmessageandexit-p<PATH>,--path<PATH>Taskconfigdirectory-r<REGEX>,--regex<REGEX>Taskconfigfilenameregexpattern-f<CONFIG>,--config<CONFIG>Taskconfigfile-i<ID>,--id<ID>Taskid(unique)-n<NAME>,--name<NAME>Taskname(unique)-m,--matIsmatchregexpatternbynamaewatchmen restart -husage:watchmenrestart[OPTIONS]options:-h,--helpshowthishelpmessageandexit-p<PATH>,--path<PATH>Taskconfigdirectory-r<REGEX>,--regex<REGEX>Taskconfigfilenameregexpattern-f<CONFIG>,--config<CONFIG>Taskconfigfile-i<ID>,--id<ID>Taskid(unique)-n<NAME>,--name<NAME>Taskname(unique)-m,--matIsmatchregexpatternbynamaewatchmen stop -husage:watchmenstop[OPTIONS]options:-h,--helpshowthishelpmessageandexit-p<PATH>,--path<PATH>Taskconfigdirectory-r<REGEX>,--regex<REGEX>Taskconfigfilenameregexpattern-f<CONFIG>,--config<CONFIG>Taskconfigfile-i<ID>,--id<ID>Taskid(unique)-n<NAME>,--name<NAME>Taskname(unique)-m,--matIsmatchregexpatternbynamaewatchmen remove -husage:watchmenremove[OPTIONS]options:-h,--helpshowthishelpmessageandexit-p<PATH>,--path<PATH>Taskconfigdirectory-r<REGEX>,--regex<REGEX>Taskconfigfilenameregexpattern-f<CONFIG>,--config<CONFIG>Taskconfigfile-i<ID>,--id<ID>Taskid(unique)-n<NAME>,--name<NAME>Taskname(unique)-m,--matIsmatchregexpatternbynamaewatchmen pause -husage:watchmenpause[OPTIONS]options:-h,--helpshowthishelpmessageandexit-p<PATH>,--path<PATH>Taskconfigdirectory-r<REGEX>,--regex<REGEX>Taskconfigfilenameregexpattern-f<CONFIG>,--config<CONFIG>Taskconfigfile-i<ID>,--id<ID>Taskid(unique)-n<NAME>,--name<NAME>Taskname(unique)-m,--matIsmatchregexpatternbynamaewatchmen resume -husage:watchmenresume[OPTIONS]options:-h,--helpshowthishelpmessageandexit-p<PATH>,--path<PATH>Taskconfigdirectory-r<REGEX>,--regex<REGEX>Taskconfigfilenameregexpattern-f<CONFIG>,--config<CONFIG>Taskconfigfile-i<ID>,--id<ID>Taskid(unique)-n<NAME>,--name<NAME>Taskname(unique)-m,--matIsmatchregexpatternbynamaewatchmen list -husage:watchmenlist[OPTIONS]options:-h,--helpshowthishelpmessageandexit-p<PATH>,--path<PATH>Taskconfigdirectory-r<REGEX>,--regex<REGEX>Taskconfigfilenameregexpattern-f<CONFIG>,--config<CONFIG>Taskconfigfile-i<ID>,--id<ID>Taskid(unique)-n<NAME>,--name<NAME>Taskname(unique)-R,--matIsmatchregexpatternbyname-m,--moreShowmoreinfo-l,--lessShowlessinfoLicense Apache Licence 2.0LicenseCopyright ahriknow 2022