I am trying to understand how can I build a parallel computing pipeline for multiple subprocesses. As I see, each subprocess block waits for the previous code block to run, whereas I have a pipeline which does not have a dependency for the previous run, and it can be handled in parallel. I want to understand whether this is possible, and if so, a sample syntax for showing how to do that would be a great help! Thanks in advance.
import sys import os import subprocess subprocess.run("python pipelinecode1.py".split() + [run_date, this_wk, last_wk, prev_wk], shell=True) subprocess.run("python pipelinecode2.py".split() + [run_date, this_wk, last_wk, prev_wk], shell=True) subprocess.run("python pipelinecode3.py".split() + [run_date, this_wk, last_wk, prev_wk], shell=True)