From d84c838e760dd33451c5a3af89ae34cf2b416a7d Mon Sep 17 00:00:00 2001 From: v6ole Date: Sun, 10 May 2026 13:59:34 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=88=A0=E9=99=A4=20dead=20code=20?= =?UTF-8?q?=E2=80=94=20markdown=20=E6=96=87=E4=BB=B6=E7=94=9F=E6=88=90?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit onu.md 和 markdown_generated 从未被实际使用,是旧项目遗留代码 --- .env.example | 4 ---- app/config.py | 3 --- app/crawler/base.py | 1 - tests/test_crawler/test_base.py | 1 - 4 files changed, 9 deletions(-) diff --git a/.env.example b/.env.example index 3d1b1eb..1d8dfa4 100644 --- a/.env.example +++ b/.env.example @@ -29,7 +29,3 @@ SCHEDULER_CRON=0 8-21 * * * LOGHIVE_ENDPOINT=http://10.10.10.14:8000 LOGHIVE_PROJECT=gx-gp-notify LOGHIVE_API_KEY= - -# Markdown -MARKDOWN_ENABLED=true -MARKDOWN_OUTPUT_FILE=onu.md diff --git a/app/config.py b/app/config.py index 0ae1bea..e9cbadb 100644 --- a/app/config.py +++ b/app/config.py @@ -38,9 +38,6 @@ class Settings(BaseSettings): loghive_project: str = "gx-gp-notify" loghive_api_key: str = "" - # Markdown - markdown_enabled: bool = True - markdown_output_file: str = "onu.md" # 公告来源(JSON 字符串,从环境变量读取) announcement_sources: str = '{"ZcyAnnouncement1":{"category_id":66485,"name":"采购公告","type":"purchase"},"ZcyAnnouncement2":{"category_id":66485,"name":"结果公告","type":"result"},"ZcyAnnouncement3":{"category_id":66485,"name":"合同公告","type":"contract"},"ZcyAnnouncement4":{"category_id":66485,"name":"更正公告","type":"correction"},"ZcyAnnouncement5":{"category_id":66485,"name":"招标文件预公示","type":"pre_announcement"},"ZcyAnnouncement6":{"category_id":66485,"name":"单一来源公示","type":"single_source"},"ZcyAnnouncement7":{"category_id":66485,"name":"电子卖场公示","type":"electronic_market"},"ZcyAnnouncement10":{"category_id":66485,"name":"履约验收公示","type":"acceptance"},"ZcyAnnouncement11":{"category_id":66485,"name":"工程类公告","type":"engineering"},"ZcyAnnouncement20":{"category_id":66485,"name":"框架协议征集公告","type":"framework_agreement"},"ZcyAnnouncement21":{"category_id":66485,"name":"框架协议入围结果公告","type":"framework_result"},"ZcyAnnouncement23":{"category_id":66485,"name":"框架协议成交结果汇总公告","type":"framework_summary"},"61-266648":{"category_id":66485,"name":"采购意向公开","type":"intention"}}' # noqa: E501 diff --git a/app/crawler/base.py b/app/crawler/base.py index ff26959..73ce69d 100644 --- a/app/crawler/base.py +++ b/app/crawler/base.py @@ -9,7 +9,6 @@ class PipelineResult: stored: int = 0 filtered: int = 0 notified: int = 0 - markdown_generated: bool = False @dataclass diff --git a/tests/test_crawler/test_base.py b/tests/test_crawler/test_base.py index ce269f4..387d2db 100644 --- a/tests/test_crawler/test_base.py +++ b/tests/test_crawler/test_base.py @@ -53,7 +53,6 @@ def test_pipeline_result_defaults(): assert result.stored == 0 assert result.filtered == 0 assert result.notified == 0 - assert result.markdown_generated is False def test_generate_content_hash():