Parcourir la source

2024-05-13
多平台搜索上线(微信, 百度, 西瓜)
弃用 search_keys, theme
搜索结果过pq敏感词策略

罗俊辉 il y a 1 an
Parent
commit
36c7ae8cdb
2 fichiers modifiés avec 15 ajouts et 14 suppressions
  1. 14 13
      applications/schedule/search_schedule.py
  2. 1 1
      hypercorn_config.toml

+ 14 - 13
applications/schedule/search_schedule.py

@@ -47,19 +47,20 @@ def recall_search_video(video_path, title, trace_id):
                     info="通过baidu搜索失败---{}".format(title),
                     trace_id=trace_id
                 )
-                xigua_result = xigua_search(title)
-                if xigua_result:
-                    return {
-                        "platform": "xg_search",
-                        "result": xigua_result[0]
-                    }
-                else:
-                    logging(
-                        code="7001",
-                        info="通过西瓜搜索失败---{}".format(title),
-                        trace_id=trace_id
-                    )
-                    return None
+                return None
+                # xigua_result = xigua_search(title)
+                # if xigua_result:
+                #     return {
+                #         "platform": "xg_search",
+                #         "result": xigua_result[0]
+                #     }
+                # else:
+                #     logging(
+                #         code="7001",
+                #         info="通过西瓜搜索失败---{}".format(title),
+                #         trace_id=trace_id
+                #     )
+                #     return None
     else:
         logging(
             code="7000",

+ 1 - 1
hypercorn_config.toml

@@ -1,7 +1,7 @@
 reload = true
 bind = "0.0.0.0:8111"
 workers = 2
-keep_alive_timeout = 60  # 保持连接的最大秒数,根据需要调整
+keep_alive_timeout = 120  # 保持连接的最大秒数,根据需要调整
 graceful_timeout = 30    # 重启或停止之前等待当前工作完成的时间
 loglevel = "debug"  # 日志级别
 accesslog = "access.log"  # 访问日志文件