Skip to content

Commit

Permalink
Use proper Status enum values (#25)
Browse files Browse the repository at this point in the history
Avoids
```
TypeError: Expected Status; got None
```
  • Loading branch information
nsmith- authored Feb 1, 2024
1 parent 98d1609 commit 5b95c08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lpcjobqueue/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def check_gone():
if str(ex) == "cannot schedule new futures after interpreter shutdown":
logger.info(f"Thread pool lost while checking worker {self.name} job {self.job_id}")
# We're not going to be able to do anything async now
self.status = None
self.status = Status.undefined
self._event_finished.set()
return
raise ex
Expand Down Expand Up @@ -184,7 +184,7 @@ def stop():
self._event_finished.set()
return
logger.error(f"Failed to forcefully close job {self.job_id}")
self.status = None
self.status = Status.undefined
self._event_finished.set()

@classmethod
Expand Down

0 comments on commit 5b95c08

Please sign in to comment.