From d02370fac8f682aa9eb9be705feb25053aecef20 Mon Sep 17 00:00:00 2001 From: DeAthBo <34346682+DeAthBo@users.noreply.github.com> Date: Mon, 12 Jan 2026 16:15:32 +0800 Subject: [PATCH 1/2] Update delete operation to refresh scheduler Refactor job removal and data handling in delete operation. --- main.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/main.py b/main.py index 5b66c4b..8e27421 100644 --- a/main.py +++ b/main.py @@ -408,9 +408,7 @@ async def rsshub_remove(self, event: AstrMessageEvent, idx: int): yield event.plain_result("索引越界") return else: - # TODO:删除对应的定时任务 - self.scheduler.remove_job() - self.data_handler.data["rsshub_endpoints"].pop(idx) + # 刷新定时任务 self._fresh_asyncIOScheduler() self.data_handler.data["rsshub_endpoints"].pop(idx) self.data_handler.save_data() yield event.plain_result("删除成功") From 1205d21874256cd17f5798c60c43050d32ea00f9 Mon Sep 17 00:00:00 2001 From: DeAthBo <34346682+DeAthBo@users.noreply.github.com> Date: Fri, 16 Jan 2026 14:01:31 +0800 Subject: [PATCH 2/2] Fix code formatting: split single line into multiple lines 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. --- main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 8e27421..b230797 100644 --- a/main.py +++ b/main.py @@ -408,7 +408,9 @@ async def rsshub_remove(self, event: AstrMessageEvent, idx: int): yield event.plain_result("索引越界") return else: - # 刷新定时任务 self._fresh_asyncIOScheduler() self.data_handler.data["rsshub_endpoints"].pop(idx) + # 刷新定时任务 + self._fresh_asyncIOScheduler() + self.data_handler.data["rsshub_endpoints"].pop(idx) self.data_handler.save_data() yield event.plain_result("删除成功")