Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions distributed/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,13 +358,22 @@ def executor(self):
return self.client

@property
def status(self):
def status(
self,
) -> Literal["pending", "cancelled", "finished", "lost", "error"] | None:
"""Returns the status

Returns
-------
str
The status
str or None
The status of the future. Possible values:

- "pending": The future is waiting to be computed
- "finished": The future has completed successfully
- "error": The future encountered an error during computation
- "cancelled": The future was cancelled
- "lost": The future's data was lost from memory
- None: The future is not yet bound to a client
"""
if self._state:
return self._state.status
Expand Down Expand Up @@ -645,7 +654,9 @@ def __init__(self, key: str):
self._event = None
self.key = key
self.exception = None
self.status = "pending"
self.status: Literal["pending", "cancelled", "finished", "lost", "error"] = (
"pending"
)
self.traceback = None
self.type = None

Expand Down
Loading