Skip to content

Commit

Permalink
Simplify running module to fix stdout buffering issue with supervisor.
Browse files Browse the repository at this point in the history
  • Loading branch information
tdicola committed Feb 11, 2015
1 parent 71cd1ad commit daaafed
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Adafruit_Video_Looper/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Import main program.
from .video_looper import main


2 changes: 1 addition & 1 deletion Adafruit_Video_Looper/video_looper.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def signal_quit(self, signal, frame):


# Main entry point.
def main():
if __name__ == '__main__':
print('Starting Adafruit Video Looper.')
# Default config path to /boot.
config_path = '/boot/video_looper.ini'
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@
license = 'GNU GPLv2',
url = 'https://github.com/adafruit/pi_video_looper',
install_requires = ['pyudev'],
packages = find_packages(),
entry_points = {'console_scripts': ['video_looper = Adafruit_Video_Looper:main']})
packages = find_packages())
2 changes: 1 addition & 1 deletion video_looper.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Supervisord configuration to run video looper at boot and
# ensure it runs continuously.
[program:video_looper]
command=video_looper
command=python -u -m Adafruit_Video_Looper.video_looper
autostart=true
autorestart=unexpected
startsecs=5

0 comments on commit daaafed

Please sign in to comment.