]> www.vanbest.org Git - motioneye-debian/commitdiff
added a separate setting for the thumbnailer interval
authorCalin Crisan <ccrisan@gmail.com>
Sat, 16 Nov 2013 19:29:57 +0000 (21:29 +0200)
committerCalin Crisan <ccrisan@gmail.com>
Sat, 16 Nov 2013 19:29:57 +0000 (21:29 +0200)
motioneye.py
settings_default.py
src/mjpgclient.py

index 09e11c64c2c36b0c2ed6fcf66e283c28715442be..ab54ab5b74683d687c2bc6399350ab0df9c17890 100755 (executable)
@@ -215,9 +215,9 @@ def _start_movie_thumbnailer():
             logging.error('failed to make movie thumbnail: %(msg)s' % {
                     'msg': unicode(e)})
 
-        ioloop.add_timeout(datetime.timedelta(seconds=settings.MJPG_CLIENT_TIMEOUT), do_next_movie_thumbail)
+        ioloop.add_timeout(datetime.timedelta(seconds=settings.THUMBNAILER_INTERVAL), do_next_movie_thumbail)
     
-    ioloop.add_timeout(datetime.timedelta(seconds=settings.MJPG_CLIENT_TIMEOUT), do_next_movie_thumbail)
+    ioloop.add_timeout(datetime.timedelta(seconds=settings.THUMBNAILER_INTERVAL), do_next_movie_thumbail)
 
 
 if __name__ == '__main__':
index 46898be54dac05ff396684f287760f3a623d12db..399720b5b9fa85e5f2353c132dd1ac6cb5383a06 100644 (file)
@@ -35,6 +35,9 @@ MOTION_CHECK_INTERVAL = 10
 # interval in seconds at which the janitor is called to remove old pictures and movies
 CLEANUP_INTERVAL = 43200
 
+# interval in seconds at which the thumbnail mechanism runs 
+THUMBNAILER_INTERVAL = 60
+
 # timeout in seconds to wait for responses when contacting a remote server
 REMOTE_REQUEST_TIMEOUT = 10
 
index b5b6491c78653da711f4806a108e5af6b9db7486..2dea7f9cbcdb6a41fe8fbb00174923de5c984025 100644 (file)
@@ -164,6 +164,6 @@ def close_all():
         client.close()
 
 
-# run the garbage collector for the first time;
-# this will start the timeout mechanism
-_garbage_collector()
\ No newline at end of file
+# schedule the garbage collector
+io_loop = ioloop.IOLoop.instance()
+io_loop.add_timeout(datetime.timedelta(seconds=settings.MJPG_CLIENT_TIMEOUT), _garbage_collector)