diff --git a/docs/examples/python/highvolume_faster_queue.py b/docs/examples/python/highvolume_faster_queue.py index ebd4115e21fba6d030f08167e96d03192f774889..ccdde705a450b2461a79c189c15dcba54365ce60 100644 --- a/docs/examples/python/highvolume_faster_queue.py +++ b/docs/examples/python/highvolume_faster_queue.py @@ -139,12 +139,14 @@ def main(): for i in range(WRITE_TASK_COUNT): queue = Queue(max_size_bytes=QUEUE_SIZE) task_queues.append(queue) + # create write processes for i in range(WRITE_TASK_COUNT): p = Process(target=run_write_task, args=(i, task_queues[i])) p.start() logging.debug(f"WriteTask-{i} started with pid {p.pid}") write_processes.append(p) + # create read processes for i in range(READ_TASK_COUNT): p = Process(target=run_read_task, args=(i, task_queues)) diff --git a/docs/examples/python/mockdatasoruce.py b/docs/examples/python/mockdatasoruce.py index cf4d8db98ad86dc4dddc057d6f573911221a4c0a..d07128a38a1f684a392375bf5ad25249cb66d5d3 100644 --- a/docs/examples/python/mockdatasoruce.py +++ b/docs/examples/python/mockdatasoruce.py @@ -3,11 +3,11 @@ import time class MockDataSource: samples = [ - "LosAngeles,0,8.8,119,0.32", - "SanDiego,1,10.7,116,0.34", - "Hollywood,2,9.9,111,0.33", - "Compton,3,8.9,113,0.329", - "San Francisco,4,9.4,118,0.141" + "8.8,119,0.32,LosAngeles,0", + "10.7,116,0.34,SanDiego,1", + "9.9,111,0.33,Hollywood,2", + "8.9,113,0.329,Compton,3", + "9.4,118,0.141,San Francisco,4" ] def __init__(self, tb_name_prefix, table_count): @@ -22,7 +22,7 @@ class MockDataSource: data = [] for i in range(self.table_count): table_name = self.table_name_prefix + str(i) - # tbName,location,groupId,current,voltage,phase + # tbName,current,voltage,phase,location,groupId row = table_name + ',' + lines[i] data.append((i, row)) # tableId, row return data