Esempio n. 1
0
def fetch_all_routes():
    app = create_app(__name__)
    with app.app_context():
        for route_id in range(3014600, 3015000, 100):
            log.info('Fetching route {}...'.format(route_id))
            try:
                store_route_info(route_id)
            except:
                time.sleep(10)
Esempio n. 2
0
def fetch_all_routes():
    app = create_app(__name__)
    with app.app_context():
        for route_id in range(3014600, 3015000, 100):
            log.info('Fetching route {}...'.format(route_id))
            try:
                store_route_info(route_id)
            except:
                time.sleep(10)
Esempio n. 3
0
def fetch_route(route_id):
    app = create_app(__name__)
    with app.app_context():
        store_route_info(route_id)
Esempio n. 4
0
def fetch_route(route_id):
    app = create_app(__name__)
    with app.app_context():
        store_route_info(route_id)