minor meyectl.py and thumbnailer.py changes
authorCalin Crisan <ccrisan@gmail.com>
Sun, 20 Sep 2015 19:20:12 +0000 (22:20 +0300)
committerCalin Crisan <ccrisan@gmail.com>
Sun, 20 Sep 2015 19:20:12 +0000 (22:20 +0300)
motioneye/meyectl.py
motioneye/thumbnailer.py

index 33157baf99d32bb974aa28f37164312f38951a9a..9bb465b2877fdc8707c5ff0cf48275766a228fce 100755 (executable)
@@ -191,7 +191,7 @@ def make_arg_parser(command=None):
         usage = description = epilog = None
         
     else:
-        usage = '%(prog)s [command] [-c CONFIG_FILE] [-d] [-v] [command options...]\n\n'
+        usage = '%(prog)s [command] [-c CONFIG_FILE] [-d] [-h] [-l] [-v] [command options...]\n\n'
         
         description = 'available commands:\n'
         description += '  startserver\n'
index c70286386708aebf3fc3cfe01143e46ae2895941..e100f0f3cbd3af6608912d9f77270402add9d7aa 100644 (file)
@@ -31,9 +31,12 @@ _process = None
 
 
 def start():
+    if not settings.THUMBNAILER_INTERVAL:
+        return
+
     # schedule the first call a bit later to improve performance at startup
     ioloop = tornado.ioloop.IOLoop.instance()
-    ioloop.add_timeout(datetime.timedelta(seconds=30), _run_process)
+    ioloop.add_timeout(datetime.timedelta(seconds=min(settings.THUMBNAILER_INTERVAL, 30)), _run_process)
 
 
 def stop():