Revert "rabbitmq"

This reverts commit 0976909cc8.
This commit is contained in:
2026-01-15 22:08:12 +08:00
parent 0976909cc8
commit 1a5d14e0e7
14 changed files with 665 additions and 419 deletions

View File

@@ -66,8 +66,7 @@ class KafkaService:
def produce(self, job_data: JobData) -> bool:
"""发送消息到Kafka"""
try:
data = job_data.to_dict()
future = self.producer.send(self.topic, key=data.get("_id"), value=data)
future = self.producer.send(self.topic, key=job_data.id, value=job_data.model_dump())
future.get(timeout=10)
return True
except KafkaError as e: