Skip to content

Commit e18c68f

Browse files
ihsaan-ullahDidayolo
authored andcommitted
uncommented code that was checking for failed program (for circle ci tests)
1 parent 951eadb commit e18c68f

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

compute_worker/compute_worker.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,23 +1432,23 @@ def start(self):
14321432

14331433
if self.is_scoring:
14341434
# Check if scoring program failed
1435-
# try:
1436-
# program_results, _, _ = task_results
1437-
# except:
1438-
# program_results, _ = task_results
1439-
# # Gather returns either normal values or exception instances when return_exceptions=True
1440-
# had_async_exc = isinstance(
1441-
# program_results, BaseException
1442-
# ) and not isinstance(program_results, asyncio.CancelledError)
1443-
# program_rc = getattr(self, "program_exit_code", None)
1444-
# failed_rc = (program_rc is None) or (program_rc != 0)
1445-
# if had_async_exc or failed_rc:
1446-
# self._update_status(
1447-
# SubmissionStatus.FAILED,
1448-
# extra_information=f"program_rc={program_rc}, async={task_results}",
1449-
# )
1450-
# # Raise so upstream marks failed immediately
1451-
# raise SubmissionException("Child task failed or non-zero return code")
1435+
try:
1436+
program_results, _, _ = task_results
1437+
except:
1438+
program_results, _ = task_results
1439+
# Gather returns either normal values or exception instances when return_exceptions=True
1440+
had_async_exc = isinstance(
1441+
program_results, BaseException
1442+
) and not isinstance(program_results, asyncio.CancelledError)
1443+
program_rc = getattr(self, "program_exit_code", None)
1444+
failed_rc = (program_rc is None) or (program_rc != 0)
1445+
if had_async_exc or failed_rc:
1446+
self._update_status(
1447+
SubmissionStatus.FAILED,
1448+
extra_information=f"program_rc={program_rc}, async={task_results}",
1449+
)
1450+
# Raise so upstream marks failed immediately
1451+
raise SubmissionException("Child task failed or non-zero return code")
14521452

14531453
self._update_status(SubmissionStatus.FINISHED)
14541454

0 commit comments

Comments
 (0)