Introduce background_job endpoints

This commit is contained in:
Matthias
2023-05-31 07:00:20 +02:00
parent 6315516d50
commit 7bccf2129f
3 changed files with 97 additions and 34 deletions

View File

@@ -27,6 +27,21 @@ class StatusMsg(BaseModel):
status: str
class BgJobStarted(StatusMsg):
job_id: str
class BackgroundTaskStatus(BaseModel):
status: str
running: bool
progress: Optional[float]
class BackgroundTaskResult(BaseModel):
error: Optional[str]
status: str
class ResultMsg(BaseModel):
result: str
@@ -376,10 +391,8 @@ class WhitelistResponse(BaseModel):
method: List[str]
class WhitelistEvaluateResponse(BaseModel):
class WhitelistEvaluateResponse(BackgroundTaskResult):
result: Optional[WhitelistResponse]
error: Optional[str]
status: str
class DeleteTrade(BaseModel):