3
0
Эх сурвалжийг харах

增加关闭rabbitMq实例

dongzhaorui 1 жил өмнө
parent
commit
24a7a2dea0

+ 5 - 2
FworkSpider/feapder/pipelines/rabbitmq_pipeline.py

@@ -1,8 +1,8 @@
 # -*- coding: utf-8 -*-
 """
-Created on 2021-04-18 14:12:21
+Created on 2023-09-23
 ---------
-@summary: 导出数据(写入rabbitmq,不直接保存在MongoDB)
+@summary:  rabbitmq数据通道
 ---------
 @author: Dzr
 """
@@ -43,3 +43,6 @@ class RabbitMqPipeline(BasePipeline):
         except Exception as e:
             log.exception(e)
             return False
+
+    def close(self):
+        self.to_db.close()