Skip to content

Commit

Permalink
sync replica up.
Browse files Browse the repository at this point in the history
  • Loading branch information
hoseinaghaei committed Feb 15, 2024
1 parent c296665 commit 84c712f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions kafka_server/broker/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,8 @@ def init():
# sync_thread.daemon = True
# sync_thread.start()

sync_replica_thread = threading.Thread(target=sync_replica)
sync_replica_thread.daemon = True
sync_replica_thread.start()

schedule.run_pending()
5 changes: 3 additions & 2 deletions kafka_server/broker/read/read_cronjob.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ def read_sample_data():
with fetch_lock:
read_instance = Read(get_primary_partition(), get_replica_url())

print("reading sample data")
print(read_instance.read_data())
# print("reading sample data")
# print(read_instance.read_data())
read_instance.read_data()


def schedule_read():
Expand Down

0 comments on commit 84c712f

Please sign in to comment.