Skip to content

Commit

Permalink
updated requirements.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
gradedSystem committed Sep 2, 2023
1 parent b909008 commit a051481
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kafka_integration/producer.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ def delivery_callback(err, msg):
location_json = json.dumps(product[entries[counter]]['location']).encode('utf-8')
producer.produce(topics[0], key=json.dumps(entry).encode('utf-8'), value=location_json, callback=delivery_callback)
time.sleep(2)
time.sleep(3)
time.sleep(1)
for counter, entry in enumerate(entries, start=0):
location_json = json.dumps(product[entries[counter]]['current']).encode('utf-8')
producer.produce(topics[1], key=json.dumps(entry).encode('utf-8'), value=location_json, callback=delivery_callback)
time.sleep(2)
time.sleep(30)
time.sleep(1)
except KeyboardInterrupt:
print("Received KeyboardInterrupt. Exiting gracefully.")
# Block until the messages are sent.
Expand Down
7 changes: 7 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
configparser==6.0.0
confluent-kafka==2.2.0
kafka-python==2.0.2
requests==2.31.0
virtualenv==20.24.4
pyspark==3.24

0 comments on commit a051481

Please sign in to comment.