def remove_all_anonymous_users_from_channels(app): from chat.datastore import redis_db, redis_channel_key with app.app_context(): channel_key_prefix = redis_channel_key("") for key in redis_db.keys(channel_key_prefix + "*"): for email, status in redis_db.hgetall(key).iteritems(): if "@" not in email and status == "offline": redis_db.hdel(key, email)
def remove_all_client_ids(app): from chat.datastore import redis_db, user_clients_key with app.app_context(): clients_key_prefix = user_clients_key({"email": ""}) for key in redis_db.keys(clients_key_prefix + "*"): redis_db.delete(key)
def remove_all_client_ids(app): from chat.datastore import redis_db, user_clients_key with app.app_context(): clients_key_prefix = user_clients_key({ "email": "" }) for key in redis_db.keys(clients_key_prefix + "*"): redis_db.delete(key)