Skip to content

通过 env 调节调度周期#684

Open
felinae98 wants to merge 1 commit intomainfrom
feat/set-interval
Open

通过 env 调节调度周期#684
felinae98 wants to merge 1 commit intomainfrom
feat/set-interval

Conversation

@felinae98
Copy link
Collaborator

@felinae98 felinae98 commented Jan 26, 2025

This change is Reviewable

@felinae98 felinae98 added the enhancement New feature or request label Jan 26, 2025
@felinae98 felinae98 requested a review from AzideCupric January 26, 2025 16:03
@netlify
Copy link

netlify bot commented Jan 26, 2025

Deploy Preview for nonebot-bison ready!

Name Link
🔨 Latest commit 4921621
🔍 Latest deploy log https://app.netlify.com/sites/nonebot-bison/deploys/67c59acbedcc8a00081aeab5
😎 Deploy Preview https://deploy-preview-684--nonebot-bison.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov
Copy link

codecov bot commented Jan 26, 2025

Codecov Report

Attention: Patch coverage is 85.71429% with 2 lines in your changes missing coverage. Please review.

Project coverage is 85.27%. Comparing base (9f16633) to head (4921621).
Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
nonebot_bison/scheduler/scheduler.py 77.77% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #684      +/-   ##
==========================================
+ Coverage   85.00%   85.27%   +0.27%     
==========================================
  Files          97       98       +1     
  Lines        5520     5670     +150     
==========================================
+ Hits         4692     4835     +143     
- Misses        828      835       +7     
Flag Coverage Δ
smoke-test 85.27% <85.71%> (+0.27%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@felinae98 felinae98 force-pushed the feat/set-interval branch from 2791f30 to 4921621 Compare March 3, 2025 12:04
@suyiiyii suyiiyii requested a review from Copilot March 29, 2025 12:06
Copy link
Contributor

Copilot AI left a 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

**self.scheduler_config.schedule_setting,
)

def _load_scehdule_rule_from_config(self):
Copy link

Copilot AI Mar 29, 2025

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.

Suggested change
def _load_scehdule_rule_from_config(self):
def _load_schedule_rule_from_config(self):

Copilot uses AI. Check for mistakes.
@suyiiyii suyiiyii closed this May 10, 2025
@suyiiyii suyiiyii reopened this May 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants