Esempio n. 1
0
def load_online_sign_users():
    config = current_app.config
    current = (int(time()) + 28800) // 60
    minutes = range(config['ONLINE_LAST_MINUTES'])
    return redis_data.sunion(
        ['online_sign_users:%d' % (current - x) for x in minutes])
Esempio n. 2
0
def get_online_users():
    config = current_app.config
    current = int(time()) // 60
    minutes = range(config['ONLINE_LAST_MINUTES'])
    return redis_data.sunion(['online_users:%d' % (current - x) for x in
                              minutes])