Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
hakan458 committed Apr 3, 2024
1 parent ed473ff commit 142d919
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,16 +208,16 @@ async def submit_batch(batch: BatchData):

topic = f"adala-input-{batch.job_id}"
producer = AIOKafkaProducer(
bootstrap_servers="kafka:9093", # TODO
value_serializer=lambda v: json.dumps(v).encode("utf-8"),
bootstrap_servers="kafka:9093", # TODO
value_serializer=lambda v: json.dumps(v).encode("utf-8"),
)
await producer.start()

try:
for record in batch.data:
await producer.send_and_wait(topic, value=record)
finally:
await producer.stop()
await producer.stop()

return Response[BatchSubmitted](data=BatchSubmitted(job_id=batch.job_id))

Expand Down

0 comments on commit 142d919

Please sign in to comment.