Ask For Task Status Seperatly and logs incrementally

This commit is contained in:
speatzle 2024-05-09 19:09:48 +02:00
parent d185784cd1
commit 12e83aa8d2
4 changed files with 73 additions and 34 deletions

View file

@ -2,6 +2,8 @@ package types
import (
"encoding/json"
"git.lastassault.de/speatzle/morffix/constants"
)
type TaskStart struct {
@ -12,13 +14,18 @@ type TaskStart struct {
}
type Task struct {
ID int `json:"id"`
FileID int `json:"file_id"`
Type int `json:"type"`
Status int `json:"status"`
Log []string `json:"log"`
ID int `json:"id"`
FileID int `json:"file_id"`
Type int `json:"type"`
Status constants.TaskStatus `json:"status"`
Log []string `json:"log"`
}
type TaskStatus struct {
Tasks []Task `json:"tasks"`
Task Task `json:"task"`
}
type TaskStatusRequest struct {
ID int `json:"id" db:"id"`
LogOffset int `json:"log_offset" db:"log_offset"`
}