Skip to content

Commit

Permalink
fix: raise input error
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Merrell committed Dec 19, 2022
1 parent c4270a3 commit 15828ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions runpod/serverless/pod_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ def start_worker():

try:
if 'input' not in next_job:
raise ValueError("Job input not found.")

job_output, job_duration_ms = job.run(next_job['id'], next_job['input'])
job.post(worker_life.worker_id, next_job['id'], job_output, job_duration_ms)
job.error(worker_life.worker_id, next_job['id'], "No input provided.")
else:
job_output, job_duration_ms = job.run(next_job['id'], next_job['input'])
job.post(worker_life.worker_id, next_job['id'], job_output, job_duration_ms)
except (KeyError, ValueError, RuntimeError) as err:
job.error(worker_life.worker_id, next_job['id'], str(err))
finally:
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = runpod
version = 0.1.13
version = 0.1.14
description = Official Python library for RunPod API & SDK.
long_description = file: README.md
long_description_content_type = text/markdown
Expand Down

0 comments on commit 15828ae

Please sign in to comment.