コード例 #1
0
ファイル: main.py プロジェクト: NeilBetham/accent
def next(key=None, user=None):
    """Responds with the milliseconds until the next image."""

    try:
        milliseconds = schedule.delay(user)
        return text_response(str(milliseconds))
    except ContentError as e:
        exception('Failed to create next content: %s' % e)
        return next_retry_response()
コード例 #2
0
ファイル: auth.py プロジェクト: gacbert/accent
def next_retry_response():
    """Creates a response for a next request with a fixed retry time."""

    return text_response(str(NEXT_RETRY_DELAY_MILLIS))