We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d9bdd8 commit 3712b16Copy full SHA for 3712b16
src/psij/job.py
@@ -156,6 +156,10 @@ def cancel(self) -> None:
156
"""
157
if not self.executor:
158
raise SubmitException('Cannot cancel job: not bound to an executor.')
159
+ elif self.status.final:
160
+ # TODO: we probably need a different type of exception for this and the above case,
161
+ # TODO: but this is probably a spec issue
162
+ raise SubmitException('Cannot cancel a job in a final state')
163
else:
164
self.executor.cancel(self)
165
0 commit comments