def remove_user(sid): user = mxcube.USERS.pop(sid) if user["operator"]: state_storage.flush() flush() else: socketio.emit("observerLogout", user, namespace='/hwr') socketio.emit("observersChanged", get_observers(), namespace='/hwr')
def remove_user(sid): user = mxcube.USERS.pop(sid) if user["operator"]: state_storage.flush() flush() else: socketio.emit("observerLogout", user, namespace="/hwr") socketio.emit("observersChanged", get_observers(), namespace="/hwr")
def signout(): """ Signout from Mxcube3 and reset the session """ global LOGGED_IN_USER qutils.save_queue(session) mxcube.queue = qutils.new_queue() LOGGED_IN_USER = None if remote_access.is_master(session.sid): state_storage.flush() remote_access.flush() session.clear() return make_response("", 200)
def signout(): """ Signout from Mxcube3 and reset the session """ global LOGGED_IN_USER qutils.save_queue(session) mxcube.queue = qutils.new_queue() mxcube.shapes.clear_all() if mxcube.CURRENTLY_MOUNTED_SAMPLE: if mxcube.CURRENTLY_MOUNTED_SAMPLE.get('location', '') == 'Manual': mxcube.CURRENTLY_MOUNTED_SAMPLE = '' LOGGED_IN_USER = None if remote_access.is_master(session.sid): state_storage.flush() remote_access.flush() session.clear() return make_response("", 200)