diff --git a/.gitignore b/.gitignore index 0758ee2..63d16c9 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,5 @@ __pycache__/ .pytest_cache/ *.egg-info/ dist/ +config.yaml +gx_gp_monitor/config/config.yaml diff --git a/gx_gp_monitor/config/config.yaml b/gx_gp_monitor/config/config.yaml deleted file mode 100644 index 2c38643..0000000 --- a/gx_gp_monitor/config/config.yaml +++ /dev/null @@ -1,135 +0,0 @@ -# 广西政府采购网公告监控系统配置文件 -# 复制此文件为 config.yaml 并修改相应配置 - -# 调试模式 -debug: false - -# 日志配置 -log_level: INFO -log_file: logs/gx_gp_monitor.log -log_max_size: 10485760 # 10MB -log_backup_count: 5 - -# 爬虫配置 -crawler: - base_url: "https://zfcg.gxzf.gov.cn" - timeout: 30 # 请求超时时间(秒) - max_retries: 3 # 最大重试次数 - retry_delay: 1.0 # 重试初始延迟 - max_retry_delay: 60.0 # 重试最大延迟 - backoff_factor: 2.0 # 退避因子 - user_agents: # User-Agent列表 - - "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" - - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15" - - "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" - proxies: [] # 代理列表 - request_delay: 1.0 # 请求间延迟 - request_delay_max: 3.0 # 请求间最大延迟 - keyword: ["大化"] # 关键词筛选(支持多个关键词) - start_date: "" # 开始日期 (YYYY-MM-DD) - end_date: "" # 结束日期 (YYYY-MM-DD) - max_pages: 10 # 最大页数 - page_size: 100 # 每页大小 - -# 数据库配置 -database: - enabled: true # 是否启用数据库存储 - type: postgresql # 数据库类型 - host: "10.10.10.14" # 数据库主机 - port: 5432 # 数据库端口 - name: "gx-gp-notify" # 数据库名称 - user: "gx-gp-notify" # 数据库用户名 - password: "MA6RBX4F6Bd5DGmw" # 数据库密码 - pool_size: 5 # 连接池大小 - max_overflow: 10 # 最大连接数 - pool_timeout: 30 # 连接超时时间 - pool_recycle: 3600 # 连接回收时间(秒) - data_retention_days: 90 # 数据保留天数 - auto_cleanup: true # 是否自动清理过期数据 - -# 企业微信通知配置 -wechat_app: - enabled: true # 是否启用企业微信通知 - corp_id: "ww69e8e44636f47780" # 企业ID - agent_id: "1000007" # 应用ID - secret: "SmelCwKFoL0E9ATWFzr-w7gsfXBTN72lT1UqnNd0HpI" # 应用Secret - token: "DmvL98cAF6x9CFtQZwqD2emGL8S7HxA" # Token - encoding_aes_key: "yAc4OoSCP92YTefHXYfw27WeG9oF11W9d6nw6QYlU3D" # 消息加密Key - port: 18001 # 服务端口 - host: "0.0.0.0" # 服务主机 - debug: false # 调试模式 - use_proxy: false # 是否使用代理API - proxy_api_url: "https://api.v6ole.top" # 代理API地址 - -# Markdown输出配置 -markdown: - enabled: true # 是否启用Markdown输出 - output_file: "onu.md" # 输出文件路径 - max_entries: 1000 # 最大条目数 - include_today_highlight: true # 是否突出显示今日公告 - template_file: "templates/announcement.md" # 模板文件 - -# 公告来源配置 -sources: - 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" - -# 调度配置已移除 - 如需定时任务功能,请重新添加 - -# 监控配置 -monitoring: - enabled: true # 是否启用监控 - health_check_interval: 300 # 健康检查间隔(秒) - alert_on_failure: true # 失败时是否告警 - max_consecutive_failures: 3 # 最大连续失败次数 - metrics_enabled: true # 是否启用指标收集