Пример #1
0
def process_flood(event_folder=None):
    LOGGER.info('-------------------------------------------')

    if 'INASAFE_LOCALE' in os.environ:
        locale_option = os.environ['INASAFE_LOCALE']
    else:
        locale_option = 'en'

    working_directory = FLOOD_WORKING_DIRECTORY
    try:
        process_event(
            working_directory, locale_option, dummy_folder=event_folder)
        LOGGER.info('Process event end.')
        return True
    except Exception as e:
        LOGGER.exception(e)

    return False
Пример #2
0
def process_flood(event_folder=None):
    LOGGER.info('-------------------------------------------')

    if 'INASAFE_LOCALE' in os.environ:
        locale_option = os.environ['INASAFE_LOCALE']
    else:
        locale_option = 'en'

    working_directory = FLOOD_WORKING_DIRECTORY
    try:
        process_event(working_directory,
                      locale_option,
                      dummy_folder=event_folder)
        LOGGER.info('Process event end.')
        return True
    except Exception as e:
        LOGGER.exception(e)

    return False
 def test_flood_event_calculate(self):
     working_dir = os.environ['FLOODMAPS_DIR']
     process_event(working_dir, locale_option='id')
 def test_flood_event_calculate(self):
     working_dir = os.environ['FLOODMAPS_DIR']
     process_event(working_dir, locale_option='id')