Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
目前 adapter-console 上报 Bot 断开的时机需要在终端断开且按下 Ctrl-C 之后,这将导致终端断开以后,彻底终止程序之前,与定时任务相关的所有行为无法被暂停。因此,本提交将上报 Bot 断开的时机前移到了终端断开时刻 (on_console_unmount),同时为了对称,把上报 Bot 连接的时机推迟到了终端挂载时刻 (on_console_mount)。该提交将能使 Driver.bot_disconnect 装饰器生效,从而使得定时任务能够提前关闭。
从日志分析而言,会将程序流程从:
变为: