Pārlūkot izejas kodu

删除功能测试

luojunhui 2 nedēļas atpakaļ
vecāks
revīzija
49abf1ff02
2 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  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