Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
Merge pull request #4938 from golemfactory/mwu/b0.22/task-api-cli-tas…
Browse files Browse the repository at this point in the history
…k-show

Return timestamp instead of datetime.datetime()
  • Loading branch information
maaktweluit authored Nov 26, 2019
2 parents db27a02 + 2915ecc commit 27b96c6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions golem/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import time
import uuid
from copy import copy, deepcopy
from datetime import datetime, timedelta
from datetime import timedelta
from typing import (
Any,
Dict,
Expand Down Expand Up @@ -871,10 +871,14 @@ def get_task(self, task_id: str) -> Optional[dict]:
if not task:
return None
subtask_ids = rtm.get_requested_task_subtask_ids(task_id)
if task.start_time is None:
time_started = model.default_now().timestamp()
else:
time_started = task.start_time.timestamp()
task_dict = {
'id': task.task_id,
'status': task.status.value,
'time_started': task.start_time or datetime.now(),
'time_started': time_started,
}
else:
# OLD taskmanager
Expand Down

0 comments on commit 27b96c6

Please sign in to comment.