def _launch_process_group(self, process_commands, streams_path):
processes = []<EOL>for cmd, tid in process_commands:<EOL><INDENT>job_timestamp = time.strftime('<STR_LIT>')<EOL>basename = "<STR_LIT>" % (self.batch_name, job_timestamp, tid)<EOL>stdout_path = os.path.join(streams_path, "<STR_LIT>" % (basename, tid))<EOL>stderr_path = os.path.join(streams_path, "<STR_LIT>" % (basename, tid))<EOL>process = { '<STR_LIT>' : tid,<EOL>'<STR_LIT>' : cmd,<EOL>'<STR_LIT>' : stdout_path,<EOL>'<STR_LIT>' : stderr_path }<EOL>processes.append(process)<EOL><DEDENT>json_path = os.path.join(self.root_directory, self.json_name % (tid))<EOL>with open(json_path, '<STR_LIT:w>') as json_file:<EOL><INDENT>json.dump(processes, json_file, sort_keys=True, indent=<NUM_LIT:4>)<EOL><DEDENT>p = subprocess.Popen([self.script_path, json_path, self.batch_name,<EOL>str(len(processes)), str(self.max_concurrency)])<EOL>if p.wait() != <NUM_LIT:0>:<EOL><INDENT>raise EnvironmentError("<STR_LIT>" % p.poll())<EOL><DEDENT>
Aggregates all process_commands and the designated output files into a
list, and outputs it as JSON, after which the wrapper script is called.