Nowcast Process Management


Example Supervisor Configuration File

Here is the complete example supervisord configuration INI file that is discussed in the sections above:

# Example circus process manager configuration file
# for a NEMO_Nowcast framework system

# Supervisor daemon and shell inherit envvars from the environment in which they are started
# %(ENV_XXX)s strings in this file are replaced with XXX envvar values;
# i.e. %(ENV_NOWCAST_ENV)s is replaced with the value of the NOWCAST_ENV envvar

# Supervisor daemon and its interfaces
logfile = %(ENV_NOWCAST_LOGS)s/supervisor.log
pidfile = %(ENV_NOWCAST_LOGS)s/
childlogdir = %(ENV_NOWCAST_LOGS)s

supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

# This value must match that used in [supervisorctl]serverurl below
port = localhost:9001

# Supervisor interactive shell tool
# Host and port values here must match those used in [inet_http_server]port above
serverurl = http://localhost:9001
prompt = nowcast-supervisor

# Long-running processes that supervisor manages
# Priority values define process startup order
command = %(ENV_NOWCAST_ENV)s/bin/python3 -m nemo_nowcast.message_broker %(ENV_NOWCAST_YAML)s
priority = 0
autorestart = true

command = %(ENV_NOWCAST_ENV)s/bin/python3 -m nemo_nowcast.manager %(ENV_NOWCAST_YAML)s
priority = 1
autorestart = true