MCPcopy Create free account
hub / github.com/comaps/comaps / parallel_worker

Function parallel_worker

tools/python/road_runner.py:49–60  ·  view source on GitHub ↗
(tasks, capitals_list, towns_list)

Source from the content-addressed store, hash-verified

47 return result
48
49def parallel_worker(tasks, capitals_list, towns_list):
50 while True:
51 if not tasks.qsize() % 1000:
52 print(tasks.qsize())
53 task = tasks.get()
54 ids = get_way_ids(task[0], task[1], sys.argv[2])
55 for id in ids:
56 if task[0][2] and task[1][2]:
57 capitals_list.add(id)
58 else:
59 towns_list.add(id)
60 tasks.task_done()
61
62if len(sys.argv) < 3:
63 print("road_runner.py <intermediate_dir> <osrm_addr>")

Callers

nothing calls this directly

Calls 3

get_way_idsFunction · 0.85
getMethod · 0.65
addMethod · 0.45

Tested by

no test coverage detected