Skip to content

Commit

Permalink
View: Set the job to failed if we throw an exception. No reason for i…
Browse files Browse the repository at this point in the history
…t to stay as pending.
  • Loading branch information
Juan Puerto committed Mar 4, 2024
1 parent 3013873 commit 3f7cc3a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/user_workspaces_server/views/workspace_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,8 @@ def put(self, request, workspace_id, put_type=None):
},
)
except Exception:
job.status = 'failed'
job.save()
raise WorkspaceClientException("Invalid job type specified")

resource_job_id = resource.launch_job(job_to_launch, workspace)
Expand Down

0 comments on commit 3f7cc3a

Please sign in to comment.