Example #1
0
 def __init__(self, config=None):
     logging.debug('instanciando')
     ApplicationSession.__init__(self, config)
     self.serverConfig = inject.instance(Config)
     self.overtime = inject.instance(Overtime)
     self.date = inject.instance(Date)
     self.profiles = inject.instance(Profiles)
Example #2
0
    def __init__(self,config=None):
        logging.debug('instanciando WampDigesto')
        ApplicationSession.__init__(self, config)

        self.digesto = inject.instance(Digesto)
        self.serverConfig = inject.instance(Config)
        self.profiles = inject.instance(Profiles)
Example #3
0
    def __init__(self, config=None):
        logging.debug('instanciando')
        ApplicationSession.__init__(self, config)

        reg = inject.instance(Registry)
        self.conn = connection.Connection(reg.getRegistry('dcsys'))
        self.loginModel = inject.instance(Login)
Example #4
0
    def __init__(self, config=None):
        ApplicationSession.__init__(self, config)
        self.is_running: bool = False
        file_path = os.path.join(config.extra['output_dir'], 'swmr_telemetry.h5')
        self._output_file = h5py.File(file_path, 'a', swmr=True, libver='latest')

        if 'telemetry' in self._output_file:
            self.telemetry = self._output_file['telemetry']
        else:
            self.telemetry = self._output_file.create_group('telemetry')
            self.telemetry.create_dataset(
                'axis0', chunks=(10,), maxshape=(None,), data=np.array([b'index', b'speed', b'altitude'], dtype='|S5')
            )
            self.telemetry.create_dataset(
                'axis1', chunks=(10,), maxshape=(None,), data=np.array([], dtype='float64')
            )
            self.telemetry.create_dataset(
                'block0_items', chunks=(10,), maxshape=(None,),
                data=np.array([b'index', b'speed', b'altitude'], dtype='|S5')
            )
            self.telemetry.create_dataset(
                'block0_values', chunks=(100, 3), maxshape=(None, 3), data=np.array([[.0, .0, .0]], dtype='float64')
            )

        self._output_file.swmr_mode = True
Example #5
0
    def __init__(self, config=None):
        logging.debug('instanciando WampDigesto')
        ApplicationSession.__init__(self, config)

        self.digesto = inject.instance(Digesto)
        self.serverConfig = inject.instance(Config)
        self.profiles = inject.instance(Profiles)
Example #6
0
    def __init__(self, config=None):
        logging.debug('instanciando')
        ApplicationSession.__init__(self, config)

        self.serverConfig = inject.instance(Config)
        self.laboralInsertion = inject.instance(LaboralInsertion)
        self.utils = inject.instance(Utils)
Example #7
0
    def __init__(self, config):
        ApplicationSession.__init__(self, config)
        self.config_extra = config.extra

        #########
        self.makemkvcon_process = None

        #########
        db_client = MongoClient("mongodb://localhost:27017/")
        digitize_app = db_client['digitize_app']
        self.videos_metadata_collection = digitize_app['videos_metadata']
        self.complete_makemkvcon_logs_collection = digitize_app[
            'complete_makemkvcon_logs']

        #########
        self.close_signal = None
        loop = asyncio.get_event_loop()
        # You should abort any long operation on SIGINT and you can do what you want SIGTERM
        # In both cases the program should exit cleanly
        # SIGINT = Ctrl-C
        loop.add_signal_handler(signal.SIGINT,
                                functools.partial(self.exit_cleanup, 'SIGINT'))
        # the kill command use the SIGTERM signal by default
        loop.add_signal_handler(
            signal.SIGTERM, functools.partial(self.exit_cleanup, 'SIGTERM'))
Example #8
0
    def __init__(self, config=None):
        logging.debug('instanciando')
        ApplicationSession.__init__(self, config)

        self.serverConfig = inject.instance(Config)
        self.profiles = inject.instance(Profiles)
        self.offices = inject.instance(Offices)
Example #9
0
    def __init__(self, config=None):
        logging.debug('instanciando')
        ApplicationSession.__init__(self, config)

        self.serverConfig = inject.instance(Config)
        self.task = inject.instance(Task)
        self.profiles = inject.instance(Profiles)
    def __init__(self, config):
        ApplicationSession.__init__(self, config)

        # special class to handle subscribe events, put all code in that class
        self.subscribe_processor = SubscribeProcessor(self.log)
        # special class to handle subscribe events, put all code in that class
        self.publish_processor = PublishProcessor(self.log, self.call)
Example #11
0
    def __init__(self, config=None):
        logging.debug('instanciando')
        ApplicationSession.__init__(self, config)

        r = inject.instance(Registry)
        self.conn = Connection(r.getRegistry('dcsys'))
        self.students = inject.instance(StudentDAO)
Example #12
0
 def __init__(self, config=None):
     ApplicationSession.__init__(self, config)
     self.traceback_app = True
     self.executor = JavaExecutor()
     self.class_name = ""
     self.resourcename = ""
     self.params = ""
Example #13
0
    def __init__(self, config=None):
        ApplicationSession.__init__(self, config)
        QMainWindow.__init__(self)
        self.bla = "hh"

        self.the_widget = MainWidget(parent=self)
        self.statusBar()
        self.main_window_init()
Example #14
0
    def __init__(self, config=None):
        logging.debug('instanciando')
        ApplicationSession.__init__(self, config)

        self.serverConfig = inject.instance(Config)
        self.loginModel = inject.instance(Login)
        self.profiles = inject.instance(Profiles)
        self.session = inject.instance(Session)
Example #15
0
    def __init__(self, client_type, info_topic, realm_name):
        self.info_topic = info_topic
        self.client_type = client_type
        self.realm_name = realm_name
        self.loop = None

        cfg = ComponentConfig(self.realm_name, {})
        ApplicationSession.__init__(self, cfg)
Example #16
0
    def __init__(self, config=None):
        logging.debug('instanciando')
        ApplicationSession.__init__(self, config)

        self.serverConfig = inject.instance(Config)
        self.users = inject.instance(Users)
        self.profiles = inject.instance(Profiles)
        self.mails = inject.instance(Mail)
Example #17
0
    def __init__(self, config=None):
        logging.debug('instanciando')
        ApplicationSession.__init__(self, config)

        r = inject.instance(Registry)
        self.conn = Connection(r.getRegistry('dcsys'))
        self.tutoriasModel = inject.instance(TutoriasModel)
        self.login = inject.instance(Login)
Example #18
0
 def __init__(self, config=None):
     logging.debug('instanciando')
     ApplicationSession.__init__(self, config)
     registry = inject.instance(Registry)
     self.reg = registry.getRegistry('dcsys')
     self.conn = Connection(self.reg)
     self.loginModel = inject.instance(Login)
     self.systemsModel = inject.instance(Systems)
Example #19
0
    def __init__(self,config=None):
        logging.debug('instanciando WampDigesto')
        ApplicationSession.__init__(self, config)
        reg = inject.instance(Registry)
        
        self.conn = connection.Connection(reg.getRegistry('dcsys2'))

        self.sileg = inject.instance(SilegModel)
Example #20
0
    def __init__(self, config=None):
        logging.debug('instanciando')
        ApplicationSession.__init__(self, config)

        self.serverConfig = inject.instance(Config)
        self.issueModel = inject.instance(IssueModel)
        self.issue = inject.instance(Issue)
        self.profiles = inject.instance(Profiles)
Example #21
0
 def __init__(self,realm, user, token, update_handler, ready_cb, close_cb, loop):
     ApplicationSession.__init__(self, config=ComponentConfig(realm=realm))
     self.user = user
     self.token = token
     self._on_update = update_handler
     self._on_ready = ready_cb
     self._on_closed = close_cb
     self.loop = loop
Example #22
0
    def __init__(self, config=None):
        logging.debug('instanciando')
        ApplicationSession.__init__(self, config)

        self.serverConfig = inject.instance(Config)
        self.users = inject.attr(Users)
        self.events = inject.attr(Events)
        self.profiles = inject.attr(Profiles)
        self.mails = inject.attr(Mail)
Example #23
0
    def __init__(self, config=None):
        logging.debug('instanciando')
        ApplicationSession.__init__(self, config)

        self.serverConfig = inject.instance(Config)
        self.date = inject.instance(model.systems.assistance.date.Date)
        self.profiles = inject.instance(Profiles)

        self.justifications = inject.instance(Justifications)
Example #24
0
 def __init__(self, realm, user, token, update_handler, ready_cb,
              close_cb, loop):
     ApplicationSession.__init__(self,
                                 config=ComponentConfig(realm=realm))
     self.user = user
     self.token = token
     self._on_update = update_handler
     self._on_ready = ready_cb
     self._on_closed = close_cb
     self.loop = loop
Example #25
0
    def __init__(self, config=None):
        logging.debug('instanciando')
        ApplicationSession.__init__(self, config)
        reg = inject.instance(Registry)

        self.conn = connection.Connection(reg.getRegistry('dcsys'))

        self.login = inject.instance(Login)
        self.date = inject.instance(model.assistance.date.Date)
        self.justifications = inject.instance(Justifications)
Example #26
0
    def __init__(self, config=None):
        logging.debug('instanciando')
        ApplicationSession.__init__(self, config)

        self.serverConfig = inject.instance(Config)
        self.date = inject.attr(Date)
        self.events = inject.attr(Events)
        self.mail = inject.attr(Mail)
        self.users = inject.attr(Users)
        self.offices = inject.attr(Offices)
Example #27
0
 def __init__(self, x, server_id, database, ignore_development=False, simdata_path='/tmp'):
     self.server_id = server_id
     self._component = GoSmartSimulationServerComponent(
         server_id,
         database,
         self.publish,
         ignore_development=ignore_development,
         simdata_path=simdata_path
     )
     ApplicationSession.__init__(self, x)
Example #28
0
 def __init__(self, x, server_id, database, ignore_development=False, simdata_path='/tmp'):
     self.server_id = server_id
     self._component = gssa.server.GoSmartSimulationServerComponent(
         server_id,
         database,
         self.publish,
         ignore_development=ignore_development,
         simdata_path=simdata_path
     )
     ApplicationSession.__init__(self, x)
Example #29
0
    def __init__(self, config=None):
        logging.debug('instanciando')
        ApplicationSession.__init__(self, config)

        reg = inject.instance(Registry)
        self.conn = connection.Connection(reg.getRegistry('dcsys'))
        self.laboralInsertion = inject.instance(LaboralInsertion)
        self.utils = inject.instance(Utils)
        self.users = inject.instance(UserDAO)
        self.mails = inject.instance(MailDAO)
Example #30
0
    def __init__(self, config=None):
        logging.debug('instanciando')
        ApplicationSession.__init__(self, config)

        self.serverConfig = inject.instance(Config)
        self.date = inject.attr(Date)
        self.events = inject.attr(Events)
        self.mail = inject.attr(Mail)
        self.users = inject.attr(Users)
        self.offices = inject.attr(Offices)
        self.justifications = inject.attr(Justifications)
Example #31
0
    def __init__(self, config=None):
        ApplicationSession.__init__(self, config)
        QMainWindow.__init__(self)

        #########
        self.capture_tab = CaptureWidget(parent=self)
        self.search_tab = MainSearchWidget()
        self.status_tab = StatusWidget()

        #########
        self.statusBar()
        self.main_window_init()
    def __init__(self, config=None):
        self.log.info("initializing component: {config}", config=config)
        ApplicationSession.__init__(self, config)

        # load the client private key (raw format)
        try:
            self._key = cryptosign.SigningKey.from_raw_key(config.extra[u'key'])
        except Exception as e:
            self.log.error("could not load client private key: {log_failure}", log_failure=e)
            self.leave()
        else:
            self.log.info("client public key loaded: {}".format(self._key.public_key()))
    def __init__(self, config=None):
        self.log.info("initializing component: {config}", config=config)
        ApplicationSession.__init__(self, config)

        # load the client private key (raw format)
        try:
            self._key = cryptosign.SigningKey.from_raw_key(config.extra[u'key'])
        except Exception as e:
            self.log.error("could not load client private key: {log_failure}", log_failure=e)
            self.leave()
        else:
            self.log.info("client public key loaded: {}".format(self._key.public_key()))
Example #34
0
    def __init__(self, x, gssa_file, subdirectory, output_files, tmp_transferrer='/tmp', input_files=None, definition_files=None, skip_clean=False, server=None):
        ApplicationSession.__init__(self, x)
        self._gssa = lxml.etree.parse(gssa_file)
        self._definition_files = definition_files
        self._input_files = input_files
        self._server = server
        self._tmp_transferrer = tmp_transferrer

        # We tar the definition files into one object for transferring and add
        # it to the definition node
        if self._definition_files is not None:
            self._definition_tmp = tempfile.NamedTemporaryFile(suffix='.tar.gz', dir=self._tmp_transferrer)
            definition_tar = tarfile.open(fileobj=self._definition_tmp, mode='w:gz')
            for definition_file in self._definition_files:
                definition_tar.add(definition_file, os.path.basename(definition_file))
                logger.debug("Added [%s]" % os.path.basename(definition_file))
            definition_tar.close()
            self._definition_tmp.flush()

            # Note that this makes the file global readable - we assume the
            # parent of the tmp directory is used to control permissions
            os.chmod(self._definition_tmp.name, stat.S_IROTH | stat.S_IRGRP | stat.S_IRUSR)

            logger.debug("Made temporary tar at %s" % self._definition_tmp.name)
            definition_node = self._gssa.find('.//definition')
            location_remote = os.path.join('/tmp', 'gssa-transferrer', os.path.basename(self._definition_tmp.name))
            definition_node.set('location', location_remote)

        # Do the same with the input surfaces
        if self._input_files is not None:
            self._input_tmp = tempfile.NamedTemporaryFile(suffix='.tar.gz', dir=self._tmp_transferrer)
            input_tar = tarfile.open(fileobj=self._input_tmp, mode='w:gz')
            for input_file in self._input_files:
                input_tar.add(input_file, os.path.basename(input_file))
                logger.debug("Added [%s]" % os.path.basename(input_file))
            input_tar.close()
            self._input_tmp.flush()

            # Note that this makes the file global readable - we assume the
            # parent of the tmp directory is used to control permissions
            os.chmod(self._input_tmp.name, stat.S_IROTH | stat.S_IRGRP | stat.S_IRUSR)

            logger.debug("Made temporary tar at %s" % self._input_tmp.name)
            input_node = lxml.etree.SubElement(self._gssa.find('.//transferrer'), 'input')
            location_remote = os.path.join('/tmp', 'gssa-transferrer', os.path.basename(self._input_tmp.name))
            input_node.set('location', location_remote)

        # Generate a simulation ID
        self._guid = uuid.uuid1()
        self._subdirectory = subdirectory
        self._output_files = output_files
        self._skip_clean = skip_clean
Example #35
0
class WampBase(object):
    """Base class for websocket streaming"""
    def __init__(self, con):
        """:param web.rest.base.Connection con: the base http connection"""
        self.conn = con
        self.runner = None
        self.url = None
        self.loop = None
        self.session = None
        self.th = None

    def connect(self, url, realm):
        """connect to websocket
        :param str url: url to which connect
        """
        self.url = url
        if self.conn.id is None:
            self.conn.login()

        self.th = Thread(target=self.__f)
        self.runner = ApplicationRunner(
            url=url,
            ssl=True,
            realm=realm,
            headers={"cookie": "sessionid=%s" % self.conn.id},
        )
        self.loop = asyncio.get_event_loop()
        self.session = ApplicationSession()
        coro = self.runner.run(self.session, start_loop=False)
        (self.__transport,
         self.__protocol) = self.loop.run_until_complete(coro)
        self.th.start()

    def subscribe(self, callback, topic):
        if self.session is None:
            raise RuntimeError("no Connection active")
        return self.session.subscribe(callback, topic)

    def leave(self):
        if self.session is not None:
            self.session.leave()
            self.stop()

    def stop(self):
        if self.loop is not None:
            self.loop.stop()
            self.loop = None

    def __f(self):
        # asyncio.set_event_loop(self.loop)
        self.loop.run_forever()
Example #36
0
    def __init__(self, config=None):
        logging.debug('instanciando')
        ApplicationSession.__init__(self, config)

        self.serverConfig = inject.instance(Config)
        self.profiles = inject.instance(Profiles)
        self.assistance = inject.instance(Assistance)
        self.fails = inject.instance(Fails)
        self.dateutils = inject.instance(Date)
        self.checks = inject.instance(ScheduleChecks)

        self.date = inject.instance(model.systems.assistance.date.Date)
        self.offices = inject.instance(Offices)
        self.schedule = inject.instance(Schedule)
Example #37
0
    def __init__(self, config=None):
        logging.debug('instanciando')
        ApplicationSession.__init__(self, config)

        self.serverConfig = inject.instance(Config)
        self.profiles = inject.instance(Profiles)
        self.assistance = inject.instance(Assistance)
        self.fails = inject.instance(Fails)
        self.dateutils = inject.instance(Date)
        self.checks = inject.instance(ScheduleChecks)

        self.assistance = inject.instance(Assistance)
        self.date = inject.instance(model.systems.assistance.date.Date)
        self.offices = inject.instance(Offices)
        self.schedule = inject.instance(Schedule)
Example #38
0
class WampBase(object):
    '''Base class for websocket streaming
    '''
    def __init__(self,con):
        ''':param web.rest.base.Connection con: the base http connection
        '''
        self.conn    = con
        self.runner  = None
        self.url     = None
        self.loop    = None
        self.session = None
        self.th      = None

    def connect(self,url,realm):
        '''connect to websocket
           :param str url: url to which connect
        '''
        self.url = url
        if self.conn.id is None:
            self.conn.login()

        self.th = Thread(target=self.__f)
        self.runner = ApplicationRunner(url=url, ssl=True, realm=realm, headers={'cookie':'sessionid=%s' % self.conn.id})
        self.loop = asyncio.get_event_loop()
        self.session = ApplicationSession()
        coro = self.runner.run(self.session,start_loop = False)
        (self.__transport, self.__protocol) = self.loop.run_until_complete(coro)
        self.th.start()

    def subscribe(self,callback,topic):
        if self.session is None:
            raise RuntimeError('no Connection active')
        return self.session.subscribe(callback,topic)


    def leave(self):
        if self.session is not None:
            self.session.leave()
            self.stop()

    def stop(self):
        if self.loop is not None:
            self.loop.stop()
            self.loop = None

    def __f(self):
        #asyncio.set_event_loop(self.loop)
        self.loop.run_forever()
Example #39
0
    def __init__(self, x, responses, action, actor, debug, server=None, **kwargs):
        ApplicationSession.__init__(self, x)
        self._kwargs = kwargs
        self._action = action
        self._server = server
        self._responses = responses

        self._actor = actor
        self._actor.set_make_call(self.execute_call)
        self._actor.set_log(self.log)

        self._apis = {}

        if debug:
            # Seemingly the start_logging call is insufficient
            self.log._set_level('trace')
        if server or debug:
            logger.info("Targeting server [%s]" % (server))
Example #40
0
    def subscribe(self, callback, topic_name, options):
        opts = {'details_arg': 'details'}
        opts.update(options)

        yield from ApplicationSession.subscribe(
            self,
            callback,
            topic_name,
            protocol.types.SubscribeOptions(**opts))
Example #41
0
    def connect(self, url, realm):
        """connect to websocket
        :param str url: url to which connect
        """
        self.url = url
        if self.conn.id is None:
            self.conn.login()

        self.th = Thread(target=self.__f)
        self.runner = ApplicationRunner(
            url=url,
            ssl=True,
            realm=realm,
            headers={"cookie": "sessionid=%s" % self.conn.id},
        )
        self.loop = asyncio.get_event_loop()
        self.session = ApplicationSession()
        coro = self.runner.run(self.session, start_loop=False)
        (self.__transport,
         self.__protocol) = self.loop.run_until_complete(coro)
        self.th.start()
Example #42
0
    def connect(self,url,realm):
        '''connect to websocket
           :param str url: url to which connect
        '''
        self.url = url
        if self.conn.id is None:
            self.conn.login()

        self.th = Thread(target=self.__f)
        self.runner = ApplicationRunner(url=url, ssl=True, realm=realm, headers={'cookie':'sessionid=%s' % self.conn.id})
        self.loop = asyncio.get_event_loop()
        self.session = ApplicationSession()
        coro = self.runner.run(self.session,start_loop = False)
        (self.__transport, self.__protocol) = self.loop.run_until_complete(coro)
        self.th.start()
Example #43
0
 def __init__(self, config=None):
     ApplicationSession.__init__(self, config)
     self.queue_to_ui = config.extra['queue_to_ui']
     self.queue_out = config.extra['queue_out']
     self.is_running = False
Example #44
0
    def __init__(self, config=None):

        ApplicationSession.__init__(self, config)

        self.serverConfig = inject.instance(Config)
Example #45
0
    def __init__(self, config=None):
        ApplicationSession.__init__(self, config)

        self.sync = inject.instance(Sync)
        self.firmwareConfig = inject.instance(Config)
Example #46
0
 def __init__(self, config=None):
     ApplicationSession.__init__(self, config)
     self.client: AbstractClient = self.config.extra['client']
     self.is_running: bool = False
Example #47
0
    def __init__(self,config=None):
        logging.debug('instanciando WampFirmware')
        ApplicationSession.__init__(self, config)

        self.firmware = inject.instance(Firmware)
        self.enrolling = False
Example #48
0
    def __init__(self, config=None):
        #logging.debug('instanciando')
        ApplicationSession.__init__(self, config)

        self.serverConfig = inject.instance(Config)
Example #49
0
 def __init__(self, config=None):
     ApplicationSession.__init__(self, config)
     print("component created")
Example #50
0
 def __init__(self, config, **kwargs):
     ApplicationSession.__init__(self, config)
     self.server = None
     self.parent_manager = None
     self.build_logs = None
     self.user_files = None
 def __init__(self, config):
     ApplicationSession.__init__(self, config)
     self.count = 0
Example #52
0
 def __init__(self, config=None):
     ApplicationSession.__init__(self, config)
     print("component created")
Example #53
0
 def __init__(self, config=None):
     logging.debug('instanciando WampMain')
     ApplicationSession.__init__(self, config)
Example #54
0
 def __init__(self, config=None):
     ApplicationSession.__init__(self, config)
     self.serial_port = None
Example #55
0
 def __init__(self, config=None):
     ApplicationSession.__init__(self, config)
     print("component created")
     self.q = self.config.extra['commqueue']
     self.tasks = []
Example #56
0
 def __init__(self, config=None):
     ApplicationSession.__init__(self, config)
     print("component created")
     self.q = self.config.extra['commqueue']
     self.tasks = []
Example #57
0
    def __init__(self, config=None):
        ApplicationSession.__init__(self, config)

        #########
        self.default_dvd_to_mpeg2_unknown = OrderedDict()
        self.default_dvd_to_mpeg2_unknown['part1'] = ('nice', '-n', '11',
                                                      'makemkvcon', '-r',
                                                      '--minlength=1',
                                                      '--progress=-same',
                                                      'mkv', 'disc:0', 'all')
        self.default_dvd_to_mpeg2_unknown['output_folder'] = [
            '/this/is/a/path',
        ]

        self.default_decklink_to_raw = OrderedDict()
        self.default_decklink_to_raw['part1'] = ('nice', '-n', '0', 'ffmpeg',
                                                 '-y', '-nostdin', '-f',
                                                 'decklink')
        self.default_decklink_to_raw['input'] = [
            '-format_code', 'hp60', '-video_input', 'hdmi', '-i',
            "Intensity Pro (1)"
        ]
        self.default_decklink_to_raw['recording_duration'] = ['-t', '60'
                                                              ]  # in seconds
        self.default_decklink_to_raw['part2'] = ('-acodec', 'copy', '-vcodec',
                                                 'copy')
        self.default_decklink_to_raw['frame_rate'] = ['-r', '25']
        self.default_decklink_to_raw['output'] = [
            '/this/is/a/path/video_file.mkv',
        ]

        self.default_raw_to_h264_aac = OrderedDict()
        self.default_raw_to_h264_aac['part1'] = ('nice', '-n', '11', 'ffmpeg',
                                                 '-y', '-nostdin', '-i')
        self.default_raw_to_h264_aac['input'] = [
            '/this/is/a/path/video_file.mkv',
        ]
        self.default_raw_to_h264_aac['aspect_ratio'] = ['-aspect', '4:3']
        self.default_raw_to_h264_aac['part2'] = ('-c:v', 'libx264', '-crf',
                                                 '25', '-preset', 'slow',
                                                 '-filter:v', 'hqdn3d=3:2:2:3',
                                                 '-c:a', 'libfdk_aac', '-vbr',
                                                 '3')
        self.default_raw_to_h264_aac['output'] = [
            '/this/is/a/path/video_file.mkv',
        ]

        self.default_raw_to_ffv1_flac = OrderedDict()
        self.default_raw_to_ffv1_flac['part1'] = ('nice', '-n', '11', 'ffmpeg',
                                                  '-y', '-nostdin', '-i')
        self.default_raw_to_ffv1_flac['input'] = [
            '/this/is/a/path/video_file.mkv',
        ]
        self.default_raw_to_ffv1_flac['aspect_ratio'] = ['-aspect', '4:3']
        self.default_raw_to_ffv1_flac['part2'] = ('-c:v', 'ffv1', '-level',
                                                  '3', '-g', '1', '-slicecrc',
                                                  '1', '-c:a', 'flac')
        self.default_raw_to_ffv1_flac['output'] = [
            '/this/is/a/path/video_file.mkv',
        ]

        #########
        self.default_log_settings = {
            'source': 'decklink_1',
            'action': 'raw_to_h264',
            'dc:identifier': '0c3579f8-97ec-4737-bbaa-daf8aa9d651f',
            'year': 1965,
            'title': 'the holloway',
            'duration': 1 / 6,
        }

        #########
        self.raw_videos_path = FILES_PATHS["raw"]
        self.compressed_videos_path = FILES_PATHS["compressed"]
        self.imported_files_path = FILES_PATHS["imported"]

        #########
        self.close_signal = None

        #########
        self.ffmpeg_supervisor_processes = list()
        self.waiting_captures_list = list()

        #########
        asyncio. async (self.waiting_conversions_handler())
        asyncio. async (self.ffmpeg_supervisor_processes_list_updater())

        #########
        loop = asyncio.get_event_loop()
        # You should abort any long operation on SIGINT and you can do what you want SIGTERM
        # In both cases the program should exit cleanly
        # SIGINT = Ctrl-C
        loop.add_signal_handler(signal.SIGINT,
                                functools.partial(self.exit_cleanup, 'SIGINT'))
        # the kill command use the SIGTERM signal by default
        loop.add_signal_handler(
            signal.SIGTERM, functools.partial(self.exit_cleanup, 'SIGTERM'))
Example #58
0
 def __init__(self, config):
     ApplicationSession.__init__(self, config)
     self.count = 0
Example #59
0
 def __init__(self,config=None):
     #logging.debug('instanciando WampMain')
     ApplicationSession.__init__(self, config)
Example #60
0
 def __init__(self, config=None):
     logging.debug('instanciando wampSinchronizer')
     ApplicationSession.__init__(self, config)