feat(core): 新增仅调试服务器运行模式
This commit is contained in:
parent
714dafc124
commit
0364169f6e
|
@ -49,6 +49,14 @@
|
|||
"-t",
|
||||
"kotonebot.tasks.common.BaseConfig"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "KotonebotDebug: Run Debug Server",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"console": "integratedTerminal",
|
||||
"module": "kotonebot.backend.debug.server",
|
||||
"args": []
|
||||
},
|
||||
]
|
||||
}
|
|
@ -136,3 +136,8 @@ def wait_message_all_done():
|
|||
if thread is not None:
|
||||
threading.Thread(target=_wait, daemon=True).start()
|
||||
|
||||
if __name__ == "__main__":
|
||||
from kotonebot.backend.context import init_context
|
||||
init_context()
|
||||
vars.debug.hide_server_log = False
|
||||
uvicorn.run(app, host="127.0.0.1", port=8000, log_level='critical' if vars.debug.hide_server_log else None)
|
Loading…
Reference in New Issue