From e5bc98963078ebacde0abecbdf26899b63ef6386 Mon Sep 17 00:00:00 2001 From: dingbo Date: Thu, 14 Jul 2022 18:15:31 +0800 Subject: [PATCH] docs: test --- docs/examples/python/highvolume_faster_queue.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/examples/python/highvolume_faster_queue.py b/docs/examples/python/highvolume_faster_queue.py index a08de04177..152223643e 100644 --- a/docs/examples/python/highvolume_faster_queue.py +++ b/docs/examples/python/highvolume_faster_queue.py @@ -65,11 +65,15 @@ def run_write_task(task_id: int, queue: Queue): writer = SQLWriter(get_connection) lines = None try: + count = 0 while True: try: # get as many as possible lines = queue.get_many(block=False, max_messages_to_get=MAX_BATCH_SIZE) - writer.process_lines(lines) + count += len(lines) + if count % 1000000 == 0: + log.info(count) + # writer.process_lines(lines) except Empty: time.sleep(0.01) except KeyboardInterrupt: -- GitLab