Example #1
0
def _get_params():
    '''
    1. lookup the latest data in mongo.
    2. return the latest number of data.
    '''
    latest_road_case = util.get_cache('cron_taipei_city_latest_road_case')
    if not latest_road_case: 
        latest_road_case = cfg.config.get('first_road_case', 0)

    latest_dig_point = util.get_cache('cron_taipei_city_latest_dig_point')
    if not latest_dig_point:
        latest_dig_point = cfg.config.get('first_dig_point', 10000000)

    return {'latest_road_case': latest_road_case, 'latest_dig_point': latest_dig_point}
def _get_params():
    '''
    1. lookup the latest data in mongo.
    2. return the latest params of data.
    '''
    latest_dig = util.get_cache('cron_new_taipei_city_latest_dig')
    return {'latest_dig': latest_dig}
Example #3
0
def _get_params():
    '''
    1. lookup the latest data in mongo.
    2. return the latest params of data.
    '''
    latest_dig = util.get_cache('cron_new_taipei_city_latest_dig')
    return {'latest_dig': latest_dig}
Example #4
0
def _get_params():
    '''
    1. lookup the latest data in mongo.
    2. return the latest number of data.
    '''
    latest_road_case = util.get_cache('cron_taipei_city_latest_road_case')
    if not latest_road_case:
        latest_road_case = cfg.config.get('first_road_case', 0)

    latest_dig_point = util.get_cache('cron_taipei_city_latest_dig_point')
    if not latest_dig_point:
        latest_dig_point = cfg.config.get('first_dig_point', 10000000)

    return {
        'latest_road_case': latest_road_case,
        'latest_dig_point': latest_dig_point
    }