Skip to content

Commit

Permalink
Fix bug with task logs
Browse files Browse the repository at this point in the history
  • Loading branch information
wdesouza committed Nov 24, 2020
1 parent 4d74f2c commit 1ee4f79
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func (m *Main) UpdateNodesWorkload(nodes []*models.Node) error {

func (m *Main) enqueueTask(task *models.Task) {
task.State = models.Queued
task.Logs = []*models.Log{}
task.Logs = []*models.Log{{}}
task.Host = ""
task.Metrics = nil
if err := m.DB.UpdateTask(task); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (m *Main) CreateTask(t *models.Task) error {

t.ID = uuid.New().String()
t.State = models.Queued
t.Logs = []*models.Log{}
t.Logs = []*models.Log{{}}
if t.Resources.CPUCores == 0 {
t.Resources.CPUCores = 1
}
Expand Down

0 comments on commit 1ee4f79

Please sign in to comment.