Update delete operation to refresh scheduler#21
Closed
DeAthBo wants to merge 2 commits intoSoulter:masterfrom
Closed
Update delete operation to refresh scheduler#21DeAthBo wants to merge 2 commits intoSoulter:masterfrom
DeAthBo wants to merge 2 commits intoSoulter:masterfrom
Conversation
Refactor job removal and data handling in delete operation.
Soulter
reviewed
Jan 16, 2026
main.py
Outdated
| # TODO:删除对应的定时任务 | ||
| self.scheduler.remove_job() | ||
| self.data_handler.data["rsshub_endpoints"].pop(idx) | ||
| # 刷新定时任务 self._fresh_asyncIOScheduler() self.data_handler.data["rsshub_endpoints"].pop(idx) |
Author
There was a problem hiding this comment.
已修复!之前注释、函数调用和数据操作都被挤在了同一行,导致代码看起来像被注释掉了。现在已经分成三行,代码格式正确了。
The comment, function call, and data operation were all on the same line, which made the code appear commented out. This fix separates them into three distinct lines for better readability and to address the review feedback.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Bug Fix: Fix remove_job() missing job_id parameter
Issue
When executing
/rss rsshub remove <idx>command, the following error occurs:Root Cause
In the
rsshub_removefunction (line 412),self.scheduler.remove_job()was called without the requiredjob_idparameter.Solution
Replaced the incorrect
remove_job()call withself._fresh_asyncIOScheduler(), which is the same approach used in theremove_commandfunction. This method refreshes all scheduled tasks after removing the endpoint from the data store.Changes
self.scheduler.remove_job()self._fresh_asyncIOScheduler()