Simon Strandgaard commited on
Commit
7492910
·
1 Parent(s): 3ac716d

Readded returncode printing

Browse files
Files changed (1) hide show
  1. src/plan/app_text2plan.py +3 -0
src/plan/app_text2plan.py CHANGED
@@ -257,6 +257,7 @@ def run_planner(submit_or_retry_button, plan_prompt, llm_model, speedvsdetail, s
257
  time.sleep(1)
258
 
259
  # Wait for the process to end and clear the active process.
 
260
  if session_state.active_proc is not None:
261
  session_state.active_proc.wait()
262
  returncode = session_state.active_proc.returncode
@@ -265,6 +266,8 @@ def run_planner(submit_or_retry_button, plan_prompt, llm_model, speedvsdetail, s
265
  # Process has completed.
266
  end_time = time.perf_counter()
267
  duration = int(ceil(end_time - start_time))
 
 
268
  if has_pipeline_complete_file(run_path):
269
  status_message = "Completed."
270
  else:
 
257
  time.sleep(1)
258
 
259
  # Wait for the process to end and clear the active process.
260
+ returncode = 'NOT SET'
261
  if session_state.active_proc is not None:
262
  session_state.active_proc.wait()
263
  returncode = session_state.active_proc.returncode
 
266
  # Process has completed.
267
  end_time = time.perf_counter()
268
  duration = int(ceil(end_time - start_time))
269
+ print(f"Process ended. returncode: {returncode}. Process ID: {child_process_id}. Duration: {duration} seconds.")
270
+
271
  if has_pipeline_complete_file(run_path):
272
  status_message = "Completed."
273
  else: