def update_users_privilege(): while True: global admin global pass_users admin = user_manager.get_admin() pass_users = user_manager.get_users() time.sleep(30)
def get_user_list(): result = [] online_users = set([user_match_dict[ws_id] for ws_id in users]) tmp_pass_users = user_manager.get_users() for name in tmp_pass_users: user = tmp_pass_users[name] status = "0" if name in online_users: status = "1" mid = [user[0], user[4], user[2], user[3], user[3] - user[2], user[5], user[7], status] result.append(mid) return ujson.dumps(result, ensure_ascii=False)
def get_user_list(): result = [] online_users = set([user_match_dict[ws_id] for ws_id in users]) tmp_pass_users = user_manager.get_users() for name in tmp_pass_users: user = tmp_pass_users[name] status = "0" if name in online_users: status = "1" mid = [ user[0], user[4], user[2], user[3], user[3] - user[2], user[5], user[7], status ] result.append(mid) return ujson.dumps(result, ensure_ascii=False)