Skip to content
This repository has been archived by the owner on May 18, 2024. It is now read-only.

Suggestion to integrate Supervisor to monitor/restart the process #50

Closed
desigi opened this issue Feb 17, 2020 · 4 comments
Closed

Suggestion to integrate Supervisor to monitor/restart the process #50

desigi opened this issue Feb 17, 2020 · 4 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@desigi
Copy link

desigi commented Feb 17, 2020

I used to use nohup and & to detach the process from my terminal and run it in the background, but I would notice that sometimes the process would just fail and I'd have to log back in and run the process again.

I would suggest using something like Supervisor to monitor the process and restart it automatically if it stops. This is the config file that I am currently running:

[program:nhl]
command=python3 /home/pi/nhl-board-dev/src/main.py --led-gpio-mapping=adafruit-hat-pwm --led-brightness=30 --led-slowdown-gpio=2
autostart=true
autorestart=true
stderr_logfile=/var/log/nhl.err.log
stdout_logfile=/var/log/nhl.out.log
@falkyre
Copy link
Contributor

falkyre commented Feb 17, 2020

That's what I'm doing. Others use screen or tmux but there's no restart. You can do the same with systemd if you want.

@falkyre
Copy link
Contributor

falkyre commented Feb 17, 2020

And bonus is you can have a web interface to your processes with supervisor

@riffnshred
Copy link
Owner

Will definitely test that out this weekend and maybe integrate that for V1 release

@riffnshred riffnshred added the good first issue Good for newcomers label Feb 21, 2020
@riffnshred riffnshred self-assigned this Feb 21, 2020
@riffnshred
Copy link
Owner

this is now one of our recommended solution as it allows controle using your phone and to switch to the MLB easily

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants