瀏覽代碼

删除功能测试

luojunhui 2 周之前
父節點
當前提交
49abf1ff02
共有 2 個文件被更改,包括 2 次插入1 次删除
  1. 1 1
      applications/async_task/delete_task.py
  2. 1 0
      requirements.txt

+ 1 - 1
applications/async_task/delete_task.py

@@ -24,7 +24,7 @@ class DeleteTask:
         }
         try:
             resp = await self.es_client.async_search(query=query)
-            return [hit["_id"] for hit in resp["hits"]["hits"]]
+            return [int(hit["_id"]) for hit in resp["hits"]["hits"]]
         except Exception as e:
             print(f"search failed: {e}")
             return []

+ 1 - 0
requirements.txt

@@ -1,4 +1,5 @@
 aiodns==3.5.0
+requests
 aiomysql==0.2.0
 black==25.1.0
 bottleneck==1.4.2