Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ def _run_job_via_supervisor(self, workload: ExecuteTask, results_queue: Queue) -
except Exception as e:
logger.exception("Task execution failed")
results_queue.put(e)
return 1
sys.exit(1)

def _launch_job(self, workload: ExecuteTask) -> tuple[Process, Queue[Exception]]:
# Improvement: Use frozen GC to prevent child process from copying unnecessary memory
Expand Down
5 changes: 3 additions & 2 deletions providers/edge3/tests/unit/edge3/cli/test_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,10 @@ async def test_supervise_launch_fail(
mock_supervise.side_effect = Exception("Supervise failed")
edge_job = worker_with_job.jobs.pop().edge_job
q = mock.MagicMock()
result = worker_with_job._run_job_via_supervisor(edge_job.command, q)
with pytest.raises(SystemExit) as exc_info:
worker_with_job._run_job_via_supervisor(edge_job.command, q)

assert result == 1
assert exc_info.value.code == 1
q.put.assert_called_once()

@patch("airflow.providers.edge3.cli.worker.jobs_fetch")
Expand Down
Loading