-
Notifications
You must be signed in to change notification settings - Fork 35
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
通过 env 调节调度周期 #684
base: main
Are you sure you want to change the base?
通过 env 调节调度周期 #684
Conversation
✅ Deploy Preview for nonebot-bison ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #684 +/- ##
==========================================
- Coverage 85.00% 84.97% -0.03%
==========================================
Files 97 97
Lines 5520 5532 +12
==========================================
+ Hits 4692 4701 +9
- Misses 828 831 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
2791f30
to
4921621
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces the ability to adjust scheduling intervals via environment variables.
- Loads the site-specific scheduling rule from configuration in scheduler.py
- Adds a new ScheduleConfig model and bison_site_schedule configuration in plugin_config.py
- Updates the documentation to illustrate how to configure scheduling via environment variables
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
nonebot_bison/scheduler/scheduler.py | Added a new helper method to load schedule rules from plugin_config and updated the scheduler initialization |
nonebot_bison/plugin_config.py | Introduced ScheduleConfig and bison_site_schedule as configurable options |
docs/usage/README.md | Added usage instructions and examples for the BISON_SITE_SCHEDULE environment variable |
@@ -63,6 +71,11 @@ def __init__( | |||
**self.scheduler_config.schedule_setting, | |||
) | |||
|
|||
def _load_scehdule_rule_from_config(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The method name '_load_scehdule_rule_from_config' contains a spelling error. Consider renaming it to '_load_schedule_rule_from_config' for clarity.
def _load_scehdule_rule_from_config(self): | |
def _load_schedule_rule_from_config(self): |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
This change is