mirror of
https://github.com/langbot-app/LangBot.git
synced 2025-11-25 19:37:36 +08:00
feat: 添加任务管理模块
This commit is contained in:
@@ -49,6 +49,16 @@ async def make_app(loop: asyncio.AbstractEventLoop) -> app.Application:
|
||||
|
||||
async def main(loop: asyncio.AbstractEventLoop):
|
||||
try:
|
||||
|
||||
# 挂系统信号处理
|
||||
import signal
|
||||
|
||||
def signal_handler(sig, frame):
|
||||
print("[Signal] 程序退出.")
|
||||
os._exit(0)
|
||||
|
||||
signal.signal(signal.SIGINT, signal_handler)
|
||||
|
||||
app_inst = await make_app(loop)
|
||||
await app_inst.run()
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user