Skip to content

Commit

Permalink
moved producer
Browse files Browse the repository at this point in the history
  • Loading branch information
dspeck1 committed Sep 30, 2024
1 parent aa70512 commit 98939c2
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,6 @@ async def main() -> None:

tasks = set()

# https://aiokafka.readthedocs.io/en/stable/producer.html
producer = AIOKafkaProducer(
bootstrap_servers=prompt_processing_kafka_cluster
)
await producer.start()
logging.info ("started kafka producer")

async with httpx.AsyncClient() as client:

try:
Expand Down Expand Up @@ -370,6 +363,12 @@ async def main() -> None:
)

try:
# https://aiokafka.readthedocs.io/en/stable/producer.html
producer = AIOKafkaProducer(
bootstrap_servers=prompt_processing_kafka_cluster
)
await producer.start()
logging.info ("started kafka producer")

#for fan_out_message in fan_out_message_list:

Expand Down

0 comments on commit 98939c2

Please sign in to comment.