Allow to import report history for a process

This commit is contained in:
Ingo Oppermann
2024-07-10 16:46:49 +02:00
parent 480dbb7f53
commit 7e90bb87ce
39 changed files with 2488 additions and 573 deletions

View File

@@ -252,8 +252,8 @@ func (h *ClusterHandler) convertStoreProcessToAPIProcess(p store.Process, filter
LastLog: p.Error,
Resources: api.ProcessUsage{
CPU: api.ProcessUsageCPU{
NCPU: api.ToNumber(1),
Limit: api.ToNumber(p.Config.LimitCPU),
NCPU: json.ToNumber(1),
Limit: json.ToNumber(p.Config.LimitCPU),
},
Memory: api.ProcessUsageMemory{
Limit: p.Config.LimitMemory,
@@ -284,8 +284,8 @@ func (h *ClusterHandler) convertStoreProcessToAPIProcess(p store.Process, filter
process.Report.Log = [][2]string{
{strconv.FormatInt(p.CreatedAt.Unix(), 10), p.Error},
}
process.Report.ExitedAt = p.CreatedAt.Unix()
process.Report.ExitState = "failed"
//process.Report.ExitedAt = p.CreatedAt.Unix()
//process.Report.ExitState = "failed"
}
}