File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -696,12 +696,11 @@ def _popen(
696
696
log .debug (f"Running { role_name } (replica { replica_id } ):\n { args_pfmt } " )
697
697
env = self ._get_replica_env (replica_params )
698
698
699
- proc = subprocess . Popen (
699
+ proc = self . run_local_job (
700
700
args = replica_params .args ,
701
701
env = env ,
702
702
stdout = stdout_ ,
703
703
stderr = stderr_ ,
704
- start_new_session = True ,
705
704
cwd = replica_params .cwd ,
706
705
)
707
706
return _LocalReplica (
@@ -714,6 +713,23 @@ def _popen(
714
713
error_file = env .get ("TORCHELASTIC_ERROR_FILE" , "<N/A>" ),
715
714
)
716
715
716
+ def run_local_job (
717
+ self ,
718
+ args : List [str ],
719
+ env : Dict [str , str ],
720
+ stdout : Optional [io .FileIO ],
721
+ stderr : Optional [io .FileIO ],
722
+ cwd : Optional [str ] = None ,
723
+ ) -> "subprocess.Popen[bytes]" :
724
+ return subprocess .Popen (
725
+ args = args ,
726
+ env = env ,
727
+ stdout = stdout ,
728
+ stderr = stderr ,
729
+ start_new_session = True ,
730
+ cwd = cwd ,
731
+ )
732
+
717
733
def _get_replica_output_handles (
718
734
self ,
719
735
replica_params : ReplicaParam ,
You can’t perform that action at this time.
0 commit comments