@@ -211,23 +211,33 @@ def launch_local(env_script, start_script, url, job_id, job_dir):
211
211
# As processes are lighter weight than jobs, this should be fine.
212
212
# This is how the current job model works locally.
213
213
cmd = [start_script , url , job_id , job_dir ]
214
+ print ("ENV_SCRIPT: %s" % env_script )
215
+ print ("START_SCRIPT: %s" % start_script )
216
+ print ("URL: %s" % url )
217
+ print ("JOB ID: %s" % job_id )
218
+ print ("JOB DIR: %s" % job_dir )
214
219
215
220
# When Popen() executes, the shell is not in interactive mode,
216
221
# so it is not sourcing any of the bash configuration files
217
222
# We need to source it so the env_script are available
218
223
cmd = "bash -c '%s; %s'" % (env_script , ' ' .join (cmd ))
224
+ print ("CMD STRING: %s" % cmd )
219
225
220
226
# Popen() may also need universal_newlines=True
221
227
proc = Popen (cmd , shell = True , stdout = PIPE , stderr = PIPE )
222
228
223
229
# Communicate pulls all stdout/stderr from the PIPEs
224
230
# This call waits until cmd is done
225
231
stdout , stderr = proc .communicate ()
232
+ print ("STDOUT: %s" % stdout )
233
+ print ("STDERR: %s" % stderr )
226
234
227
235
# proc.returncode will be equal to None if the process hasn't finished
228
236
# yet. If cmd was terminated by a SIGNAL, it will be a negative value.
229
237
# (*nix platforms only)
230
238
error = None
239
+ print ("RETURN CODE: %s" % proc .returncode )
240
+ print ("JOB ID: %s" % job_id )
231
241
232
242
if proc .returncode != 0 :
233
243
error = "error from launch_local when launching cmd='%s'" % cmd
0 commit comments