Add CoreID field

This commit is contained in:
Ingo Oppermann 2023-07-17 17:00:20 +02:00
parent 34db225eb0
commit 0519059f3d
No known key found for this signature in database
GPG Key ID: 2AB32426E9DD229E
3 changed files with 2 additions and 14 deletions

View File

@ -1,7 +1,6 @@
package api
import (
"encoding/json"
"time"
)
@ -65,19 +64,6 @@ type ClusterNodeFiles struct {
Files map[string][]string `json:"files"`
}
type ClusterProcess struct {
ID string `json:"id"`
Owner string `json:"owner"`
Domain string `json:"domain"`
NodeID string `json:"node_id"`
Reference string `json:"reference"`
Order string `json:"order"`
State string `json:"state"`
CPU json.Number `json:"cpu" swaggertype:"number" jsonschema:"type=number"` // percent 0-100*ncpu
Memory uint64 `json:"memory_bytes"` // bytes
Runtime int64 `json:"runtime_seconds"` // seconds
}
type ClusterLock struct {
Name string `json:"name"`
ValidUntil time.Time `json:"valid_until"`

View File

@ -15,6 +15,7 @@ type Process struct {
Domain string `json:"domain"`
Type string `json:"type" jsonschema:"enum=ffmpeg"`
Reference string `json:"reference"`
CoreID string `json:"core_id"`
CreatedAt int64 `json:"created_at" format:"int64"`
UpdatedAt int64 `json:"updated_at" format:"int64"`
Config *ProcessConfig `json:"config,omitempty"`

View File

@ -928,6 +928,7 @@ func (h *RestreamHandler) getProcess(id app.ProcessID, filter filter) (api.Proce
Domain: process.Domain,
Reference: process.Reference,
Type: "ffmpeg",
CoreID: h.restream.ID(),
CreatedAt: process.CreatedAt,
UpdatedAt: process.UpdatedAt,
}