def process_shakemap(shake_id=None):
     """Process a given shake_id for realtime shake"""
     LOGGER.info('Inotify received new shakemap')
     tz = get_localzone()
     notify_realtime_rest(datetime.datetime.now(tz=tz))
     done = False
     while not done:
         try:
             done = process_event(working_dir=working_dir,
                                  event_id=shake_id,
                                  locale=locale_option)
         except Exception as e:  # pylint: disable=W0702
             LOGGER.info('Process event failed')
             LOGGER.exception(e)
             LOGGER.info('Retrying to process event')
     LOGGER.info('Shakemap %s handled' % (shake_id, ))
 def process_shakemap(shake_id=None):
     """Process a given shake_id for realtime shake"""
     LOGGER.info('Inotify received new shakemap')
     tz = get_localzone()
     notify_realtime_rest(datetime.datetime.now(tz=tz))
     done = False
     while not done:
         try:
             done = process_event(
                 working_dir=working_dir,
                 event_id=shake_id,
                 locale=locale_option)
         except Exception as e:  # pylint: disable=W0702
             LOGGER.info('Process event failed')
             LOGGER.exception(e)
             LOGGER.info('Retrying to process event')
     LOGGER.info('Shakemap %s handled' % (shake_id, ))
Beispiel #3
0
 def test_notify_realtime_rest(self):
     timestamp = datetime.datetime.utcnow()
     notify_realtime_rest(timestamp)
Beispiel #4
0
 def test_notify_realtime_rest(self):
     timestamp = datetime.datetime.utcnow()
     notify_realtime_rest(timestamp)