Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

考慮移除 sched #279

Open
cleoold opened this issue Sep 23, 2021 · 1 comment
Open

考慮移除 sched #279

cleoold opened this issue Sep 23, 2021 · 1 comment
Labels
dependencies Pull requests that update a dependency file optimization Optimization for existing code

Comments

@cleoold
Copy link
Member

cleoold commented Sep 23, 2021

Nonrbot 可選的內置了一個 APSCHEDULER 的子類,其行為和父類的完全一致並且默認會在 Nonrbot 加載時創建。

現在我們考慮在未來的版本中移除對這個功能的支持,原因如下:

  • 此 scheduler 的功能和原版完全一致,集成沒有意義,不如用戶自行按需安裝
  • 並非所有用戶都用得到 APSCHEDULER
  • 現在版本 Nonebot 會在加載時做判斷來給 scheduler 賦值成一個 AsyncScheduler 對象或 None。這個寫法對類型檢查和 ide 極度不友好,即使用戶安裝了 Apscheduler
  • nb2 不集成 scheduler

現在徵求大家的意見,歡迎評論。

如果沒有異議,我計劃:

  • 未來的某個版本中 start_scheduler 的默認值會改為 False
  • 然後刪除相關代碼
@cleoold cleoold added dependencies Pull requests that update a dependency file optimization Optimization for existing code labels Sep 23, 2021
@cleoold cleoold pinned this issue Sep 28, 2021
@cleoold cleoold added this to the NoneBot 1.9 - 1.10 milestone Sep 28, 2021
@ZhaoZuohong
Copy link
Contributor

我建议做成插件

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file optimization Optimization for existing code
Projects
None yet
Development

No branches or pull requests

2 participants