def get_online_users(guest=False): # pragma: no cover """Returns all online users within a specified time range :param guest: If True, it will return the online guests """ current = int(time.time()) // 60 minutes = range_method(flaskbb_config["ONLINE_LAST_MINUTES"]) if guest: return redis_store.sunion(["online-guests/%d" % (current - x) for x in minutes]) return redis_store.sunion(["online-users/%d" % (current - x) for x in minutes])
def get_online_users(guest=False): # pragma: no cover """Returns all online users within a specified time range :param guest: If True, it will return the online guests """ current = int(time.time()) // 60 minutes = range_method(flaskbb_config['ONLINE_LAST_MINUTES']) if guest: return redis_store.sunion( ['online-guests/%d' % (current - x) for x in minutes]) return redis_store.sunion( ['online-users/%d' % (current - x) for x in minutes])