notify_new_shake.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:inasafe-realtime 作者: inasafe 项目源码 文件源码
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, ))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号