Exemplo n.º 1
0
def autoupdate():
    """
    Start automatic update on schedule.

    Quick (actual-only) updates are run every hour.
    Full updates are run every Monday.
    """
    safe_update = safe_crash(do_update)
    schedule.every().monday.do(lambda: safe_update(None))
    schedule.every().hour.do(lambda: safe_update(get_today()))
    while True:
        schedule.run_pending()
        sleep(1)
Exemplo n.º 2
0
def autoupdate():
    """
    Start automatic update on schedule.

    Quick (actual-only) updates are run every hour.
    Full updates are run every Monday.
    """
    safe_update = safe_crash(do_update)
    schedule.every().monday.do(lambda: safe_update(None))
    schedule.every().hour.do(lambda: safe_update(get_today()))
    while True:
        schedule.run_pending()
        sleep(1)
Exemplo n.º 3
0
def update(all):
    """
    Import events and places from KudaGo.
    """
    since = None if all else get_today()
    do_update(since)
Exemplo n.º 4
0
def update(all):
    """
    Import events and places from KudaGo.
    """
    since = None if all else get_today()
    do_update(since)