From 736b78df4295238cece8fbed6b5bd28eae31f2a5 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sun, 20 Sep 2015 22:20:12 +0300 Subject: [PATCH] minor meyectl.py and thumbnailer.py changes --- motioneye/meyectl.py | 2 +- motioneye/thumbnailer.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/motioneye/meyectl.py b/motioneye/meyectl.py index 33157ba..9bb465b 100755 --- a/motioneye/meyectl.py +++ b/motioneye/meyectl.py @@ -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' diff --git a/motioneye/thumbnailer.py b/motioneye/thumbnailer.py index c702863..e100f0f 100644 --- a/motioneye/thumbnailer.py +++ b/motioneye/thumbnailer.py @@ -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(): -- 2.39.5