Skip to content

Commit

Permalink
Add Task.time_last_queued (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
froxCZ committed Apr 15, 2021
1 parent fc5e786 commit 6d2285d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tasktiger/task.py
Expand Up @@ -142,6 +142,14 @@ def id(self):
def data(self):
return self._data

@property
def time_last_queued(self):
timestamp = self._data.get("time_last_queued")
if timestamp is None:
return None
else:
return datetime.datetime.utcfromtimestamp(timestamp)

@property
def state(self):
return self._state
Expand Down

0 comments on commit 6d2285d

Please sign in to comment.