Your question is not very clear. But if you want more than one function to be called when the job is done, just make another call to job.add_done_callback
.
with concurrent.futures.ProcessPoolExecutor(max_workers=(2*multiprocessing.cpu_count()+1)) as executor:
for netelement in DOC['code']['info']['dev']:
job = executor.submit(bgp_communities.do_lookup, netelement)
job.add_done_callback(functools.partial(bgp_communities.do_data_wrangling, DOC))
job.add_done_callback(...)
see the docs:
add_done_callback(fn)
Attaches the callable fn to the future. fn will be called, with the future as its only argument, when the future is cancelled or finishes running.
Added callables are called in the order that they were added and are always called in a thread belonging to the process that added them. If the callable raises an Exception subclass, it will be logged and ignored. If the callable raises a BaseException subclass, the behavior is undefined.
If the future has already completed or been cancelled, fn will be called immediately.