Skip to content

Commit

Permalink
[ws-daemon] Remove missing cpuacct.usage file log
Browse files Browse the repository at this point in the history
  • Loading branch information
aledbf authored and roboquat committed Apr 26, 2022
1 parent eab5b21 commit 9b2cbd2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion components/ws-daemon/pkg/cpulimit/dispatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ package cpulimit

import (
"context"
"errors"
"os"
"path/filepath"
"sync"
"time"
Expand Down Expand Up @@ -114,9 +116,13 @@ func (d *DispatchListener) source(context.Context) ([]Workspace, error) {
for id, w := range d.workspaces {
usage, err := w.CFS.Usage()
if err != nil {
log.WithFields(w.OWI).WithError(err).Warn("cannot read CPU usage")
if !errors.Is(err, os.ErrNotExist) {
log.WithFields(w.OWI).WithError(err).Warn("cannot read CPU usage")
}

continue
}

throttled, err := w.CFS.NrThrottled()
if err != nil {
log.WithFields(w.OWI).WithError(err).Warn("cannot read times cgroup was throttled")
Expand Down

0 comments on commit 9b2cbd2

Please sign in to comment.