mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
feat: set progressTasks in Callback correctly
This commit is contained in:
@@ -29,14 +29,15 @@ def __run_download(job_id: str, config_loc: Config):
|
|||||||
exchange = get_exchange(config_loc)
|
exchange = get_exchange(config_loc)
|
||||||
|
|
||||||
def ft_callback(task) -> None:
|
def ft_callback(task) -> None:
|
||||||
print(task)
|
ApiBG.jobs[job_id]["progress_tasks"][str(task.id)] = {
|
||||||
|
"progress": task.completed,
|
||||||
|
"total": task.total,
|
||||||
|
"description": task.description,
|
||||||
|
}
|
||||||
|
|
||||||
pt = get_progress_tracker(ft_callback=ft_callback)
|
pt = get_progress_tracker(ft_callback=ft_callback)
|
||||||
|
|
||||||
download_data(config_loc, exchange, progress_tracker=pt)
|
download_data(config_loc, exchange, progress_tracker=pt)
|
||||||
# ApiBG.jobs[job_id]["result"] = {
|
|
||||||
|
|
||||||
# }
|
|
||||||
ApiBG.jobs[job_id]["status"] = "success"
|
ApiBG.jobs[job_id]["status"] = "success"
|
||||||
except (OperationalException, Exception) as e:
|
except (OperationalException, Exception) as e:
|
||||||
logger.exception(e)
|
logger.exception(e)
|
||||||
@@ -66,6 +67,7 @@ def pairlists_evaluate(
|
|||||||
"category": "download_data",
|
"category": "download_data",
|
||||||
"status": "pending",
|
"status": "pending",
|
||||||
"progress": None,
|
"progress": None,
|
||||||
|
"progress_tasks": {},
|
||||||
"is_running": False,
|
"is_running": False,
|
||||||
"result": {},
|
"result": {},
|
||||||
"error": None,
|
"error": None,
|
||||||
|
|||||||
Reference in New Issue
Block a user