# interval in seconds at which motionEye checks if motion is running
motion_check_interval 10
+# whether to restart the motion daemon when an error occurs while communicating with it
+motion_restart_on_errors false
+
# interval in seconds at which the janitor is called
# to remove old pictures and movies
cleanup_interval 43200
logging.error('connection problem detected for mjpg client for camera %(camera_id)s on port %(port)s' % {
'port': self._port, 'camera_id': self._camera_id})
- motionctl.stop(invalidate=True) # this will close all the mjpg clients
- motionctl.start(deferred=True)
-
+ if settings.MOTION_RESTART_ON_ERRORS:
+ motionctl.stop(invalidate=True) # this will close all the mjpg clients
+ motionctl.start(deferred=True)
+
MjpgClient._last_erroneous_close_time = now
def _check_error(self):
logging.error('mjpg client timed out receiving data for camera %(camera_id)s on port %(port)s' % {
'camera_id': camera_id, 'port': port})
- motionctl.stop(invalidate=True) # this will close all the mjpg clients
- motionctl.start(deferred=True)
+ if settings.MOTION_RESTART_ON_ERRORS:
+ motionctl.stop(invalidate=True) # this will close all the mjpg clients
+ motionctl.start(deferred=True)
break
# interval in seconds at which motionEye checks if motion is running
MOTION_CHECK_INTERVAL = 10
+# whether to restart the motion daemon when an error occurs while communicating with it
+MOTION_RESTART_ON_ERRORS = False
+
# interval in seconds at which the janitor is called
# to remove old pictures and movies
CLEANUP_INTERVAL = 43200