Ask For Task Status Seperatly and logs incrementally
This commit is contained in:
parent
d185784cd1
commit
12e83aa8d2
4 changed files with 73 additions and 34 deletions
|
@ -32,8 +32,19 @@ func taskStart(ctx context.Context, req rpc.Request) (any, error) {
|
|||
}
|
||||
|
||||
func taskStatus(ctx context.Context, req rpc.Request) (any, error) {
|
||||
var data types.TaskStatusRequest
|
||||
err := json.Unmarshal(*req.Params, &data)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Unmarshal Task Status Request: %w", err)
|
||||
}
|
||||
|
||||
t, err := task.Get(data)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Get Task Status: %w", err)
|
||||
}
|
||||
|
||||
return types.TaskStatus{
|
||||
Tasks: task.Get(),
|
||||
Task: *t,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue