Exemplo n.º 1
0
    def setUpClass(cls):
        # Configure the logger.
        cls.logger = logging.getLogger('mss_dataserver')
        cls.logger.addHandler(mss_dataserver.get_logger_handler(log_level = 'DEBUG'))

        cls.project = test_util.create_db_test_project()
        test_util.clear_project_database_tables(cls.project)
        cls.project.load_inventory(update_from_xml = True)
Exemplo n.º 2
0
    def setUpClass(cls):
        # Configure the logger.
        cls.logger = logging.getLogger('mss_dataserver')
        cls.logger.addHandler(
            mss_dataserver.get_logger_handler(log_level='DEBUG'))

        cls.project = test_util.create_db_test_project()
        test_util.clear_project_database_tables(cls.project)
        cls.project.load_inventory(update_from_xml=True)

        cls.create_events(cls)

        host = cls.project.config['seedlink']['host']
        port = cls.project.config['seedlink']['port']
        stations = cls.project.config['process']['stations']
        data_dir = cls.project.config['output']['data_dir']
        event_dir = cls.project.config['output']['event_dir']
        process_interval = cls.project.config['process']['interval']
        pgv_sps = cls.project.config['process']['pgv_sps']
        pgv_archive_time = cls.project.config['process']['pgv_archive_time']
        trigger_thr = cls.project.config['process']['trigger_threshold']
        warn_thr = cls.project.config['process']['warn_threshold']
        valid_event_thr = cls.project.config['process'][
            'valid_event_threshold']
        event_archive_size = cls.project.config['process'][
            'event_archive_size']

        if len(stations) == 0:
            stations = None

        server_url = host + ':' + str(port)

        monitor_stream = obspy.core.Stream()
        stream_lock = threading.Lock()
        stop_event = None
        loop = None

        cls.client = monitorclient.MonitorClient(
            project=cls.project,
            asyncio_loop=loop,
            server_url=server_url,
            stations=stations,
            monitor_stream=monitor_stream,
            stream_lock=stream_lock,
            data_dir=data_dir,
            event_dir=event_dir,
            process_interval=process_interval,
            pgv_sps=pgv_sps,
            stop_event=stop_event,
            pgv_archive_time=pgv_archive_time,
            trigger_thr=trigger_thr,
            warn_thr=warn_thr,
            valid_event_thr=valid_event_thr,
            event_archive_size=event_archive_size)
Exemplo n.º 3
0
 def setUpClass(cls):
     # Configure the logger.
     cls.logger = logging.getLogger('mss_dataserver')
     cls.logger.addHandler(mss_dataserver.get_logger_handler(log_level = 'DEBUG'))