bugfix
This commit is contained in:
parent
0a4f076a0b
commit
c3253584fd
@ -7,6 +7,7 @@ import json
|
||||
import time
|
||||
from typing import Any, Dict
|
||||
from appPublic.worker import get_event_loop, schedule_interval, schedule_once
|
||||
from appPublic.dictObject import DictObject
|
||||
from appPublic.uniqueID import getID
|
||||
from appPublic.log import debug, exception
|
||||
|
||||
@ -219,6 +220,17 @@ class LongTasks:
|
||||
|
||||
async def get_redis_task(self, taskid):
|
||||
task = await self.redis.hgetall(f'{self.taskname}:task:{taskid}')
|
||||
task = DictObject(**task)
|
||||
if task.created_at:
|
||||
task.created_at = float(task.created_at)
|
||||
if task.started_at:
|
||||
task.started_at = float(task.started_at)
|
||||
if task.finished_at:
|
||||
task.finished_at = float(task.finished_at)
|
||||
if task.payload:
|
||||
task.payload = json.loads(taskload)
|
||||
if task.status == 'SUCCEEDED' and task.result:
|
||||
task.result = json.loads(task.result)
|
||||
return task
|
||||
|
||||
async def delete_redis_task(self, taskid):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user