def reload(): _event_manager.remove_handlers() xauth.refresh_users() _manager.reload() # 重新加载定时任务 _manager.load_tasks() cacheutil.clear_temp() load_init_script() fire("sys.reload")
def reload(): _event_manager.remove_handlers() xauth.refresh_users() _manager.reload() # 重新加载定时任务 _manager.load_tasks() cacheutil.clear_temp() load_init_script() load_plugins(xconfig.PLUGINS_DIR)
def test_add_and_remove_user(self): # 创建用户 result = xauth.add_user("u123456", "123456") print(result) users = xauth.refresh_users() print(users) self.assertEqual(2, len(users)) # 删除用户 xauth.remove_user("u123456") check = xauth.find_by_name("u123456") self.assertEqual(None, check)
def test_add_user(self): xauth.add_user("u123456", "123456") users = xauth.refresh_users() self.assertEqual(2, len(users))
def reload(): xauth.refresh_users() _manager.reload() _event_manager.remove_handlers() if xconfig.INIT_SCRIPT is not None: xutils.exec_script(xconfig.INIT_SCRIPT)