Procházet zdrojové kódy

删除功能测试

luojunhui před 2 týdny
rodič
revize
49abf1ff02
2 změnil soubory, kde provedl 2 přidání a 1 odebrání
  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