Skip to content

Commit 8e3c55f

Browse files
committed
Update rp_job.py
1 parent fa08642 commit 8e3c55f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

runpod/serverless/modules/rp_job.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,11 @@ async def run_job(handler: Callable, job: Dict[str, Any]) -> Dict[str, Any]:
116116
run_result["error"] = str(run_result["output"].pop("error"))
117117

118118
if job_output.get("refresh_worker", False):
119-
job_output.pop("refresh_worker")
120-
run_result = {
121-
"stopPod": True,
122-
"output": job_output
123-
}
119+
run_result["stopPod"] = True
120+
run_result["output"].pop("refresh_worker")
121+
122+
if run_result["output"] == {}:
123+
run_result.pop("output")
124124

125125
elif isinstance(job_output, bool):
126126
run_result = {"output": job_output}

0 commit comments

Comments
 (0)