Simplify running module to fix stdout buffering issue with supervisor.
This commit is contained in:
parent
71cd1ad185
commit
daaafedb45
@ -1,2 +1,2 @@
|
|||||||
# Import main program.
|
|
||||||
from .video_looper import main
|
|
||||||
|
@ -214,7 +214,7 @@ class VideoLooper(object):
|
|||||||
|
|
||||||
|
|
||||||
# Main entry point.
|
# Main entry point.
|
||||||
def main():
|
if __name__ == '__main__':
|
||||||
print('Starting Adafruit Video Looper.')
|
print('Starting Adafruit Video Looper.')
|
||||||
# Default config path to /boot.
|
# Default config path to /boot.
|
||||||
config_path = '/boot/video_looper.ini'
|
config_path = '/boot/video_looper.ini'
|
||||||
|
3
setup.py
3
setup.py
@ -10,5 +10,4 @@ setup(name = 'Adafruit_Video_Looper',
|
|||||||
license = 'GNU GPLv2',
|
license = 'GNU GPLv2',
|
||||||
url = 'https://github.com/adafruit/pi_video_looper',
|
url = 'https://github.com/adafruit/pi_video_looper',
|
||||||
install_requires = ['pyudev'],
|
install_requires = ['pyudev'],
|
||||||
packages = find_packages(),
|
packages = find_packages())
|
||||||
entry_points = {'console_scripts': ['video_looper = Adafruit_Video_Looper:main']})
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# Supervisord configuration to run video looper at boot and
|
# Supervisord configuration to run video looper at boot and
|
||||||
# ensure it runs continuously.
|
# ensure it runs continuously.
|
||||||
[program:video_looper]
|
[program:video_looper]
|
||||||
command=video_looper
|
command=python -u -m Adafruit_Video_Looper.video_looper
|
||||||
autostart=true
|
autostart=true
|
||||||
autorestart=unexpected
|
autorestart=unexpected
|
||||||
startsecs=5
|
startsecs=5
|
||||||
|
Loading…
Reference in New Issue
Block a user