Skip to content

Fix ghost monitoring after removing URL from URL_config.ini#1410

Open
as2931543asd wants to merge 1 commit into
ihmily:mainfrom
as2931543asd:fix-ghost-monitor-after-url-removal
Open

Fix ghost monitoring after removing URL from URL_config.ini#1410
as2931543asd wants to merge 1 commit into
ihmily:mainfrom
as2931543asd:fix-ghost-monitor-after-url-removal

Conversation

@as2931543asd

@as2931543asd as2931543asd commented Apr 17, 2026

Copy link
Copy Markdown

📜 标题(Title)

请提供这个Pull Request中提议的更改的简洁描述:

  • Fix ghost monitoring after removing URL from URL_config.ini

🔍 描述(Description)

请描述这个PR做了什么/为什么这些更改是必要的:

  • Fixes a stale monitoring state when a live URL is removed directly from config/URL_config.ini.
  • Previously, the stop path only handled commented URLs, so a URL deleted from the config could remain in running_list and keep showing as monitored.
  • This change compares the current running URL list with the URLs still present in the config during reload, and appends missing running URLs to url_comments.
  • This reuses the existing worker stop-and-cleanup flow instead of introducing a separate cleanup path.

📝 类型(Type of Change)

这个PR引入了哪种类型的更改?(请勾选所有适用的选项)

  • 修复Bug
  • 新功能
  • 代码风格更新(格式化,局部变量)
  • 重构(改进代码结构)
  • 构建相关更改(依赖项,构建脚本等)
  • 其他:请描述

🏗️ 测试(Testing)

请描述您已经进行的测试:

  • Manually tested by adding a live URL, waiting until it entered monitoring state, then deleting the URL line directly from config/URL_config.ini.
  • Verified that the deleted URL was routed through the existing stop signal path and the monitoring entry was cleared cleanly.
  • Verified syntax with python3 -m py_compile main.py.

如果适用,请提供测试更改的说明:

  • Start the program with a valid live URL in config/URL_config.ini.
  • Wait until the URL enters monitoring state.
  • Delete the URL line directly from config/URL_config.ini.
  • Wait for the next config reload cycle and confirm the monitoring entry disappears.

📋 检查清单(Checklist)

在您创建这个PR之前,请确保以下所有框都被勾选,方法是在每个框中放置一个x

  • 我已经阅读了贡献指南文档
  • 我的更改没有产生新的警告
  • 我已经添加了覆盖我更改的测试
  • 我已经相应地更新了文档(如果适用)
  • 我遵循了这个项目的代码风格

感谢您的贡献!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant