Esempio n. 1
0
    def checker():
        if ioloop._stopped:
            return

        if not motionctl.running() and motionctl.started() and config.has_local_enabled_cameras():
            try:
                logging.error("motion not running, starting it")
                motionctl.start()

            except Exception as e:
                logging.error("failed to start motion: %(msg)s" % {"msg": unicode(e)}, exc_info=True)

        ioloop.add_timeout(datetime.timedelta(seconds=settings.MOTION_CHECK_INTERVAL), checker)
Esempio n. 2
0
    def checker():
        if io_loop._stopped:
            return
            
        if not motionctl.running() and motionctl.started() and config.get_enabled_local_motion_cameras():
            try:
                logging.error('motion not running, starting it')
                motionctl.start()
            
            except Exception as e:
                logging.error('failed to start motion: %(msg)s' % {
                        'msg': unicode(e)}, exc_info=True)

        io_loop.add_timeout(datetime.timedelta(seconds=settings.MOTION_CHECK_INTERVAL), checker)
Esempio n. 3
0
    def checker():
        #vector fix me: print ("Type:",type(io_loop))
        if not io_loop:
            #if io_loop._stopped:
            print("Return...")
            return

        if not motionctl.running() and motionctl.started(
        ) and config.get_enabled_local_motion_cameras():
            try:
                logging.error('motion not running, starting it')
                motionctl.start()

            except Exception as e:
                logging.error('failed to start motion: %(msg)s' %
                              {'msg': str(e)},
                              exc_info=True)

        io_loop.add_timeout(
            datetime.timedelta(seconds=settings.MOTION_CHECK_INTERVAL),
            checker)