Skip to content

Commit

Permalink
Fix loading statusfile error checking
Browse files Browse the repository at this point in the history
  • Loading branch information
thom-at-redhat committed Oct 29, 2024
1 parent c38b640 commit 97957d1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/workceptor/workceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,10 @@ func (w *Workceptor) scanForUnit(unitID string) {
if !ok {
statusFilename := path.Join(unitdir, "status")
sfd := &StatusFileData{}
_ = sfd.Load(statusFilename)
err := sfd.Load(statusFilename)
if err != nil {
w.nc.GetLogger.Error("Error loading %s: %s", statusFilename, err)

Check failure on line 342 in pkg/workceptor/workceptor.go

View workflow job for this annotation

GitHub Actions / go test coverage

w.nc.GetLogger.Error undefined (type func() *logger.ReceptorLogger has no field or method Error)

Check failure on line 342 in pkg/workceptor/workceptor.go

View workflow job for this annotation

GitHub Actions / go test coverage

w.nc.GetLogger.Error undefined (type func() *logger.ReceptorLogger has no field or method Error)

Check failure on line 342 in pkg/workceptor/workceptor.go

View workflow job for this annotation

GitHub Actions / receptor (Go 1.20)

w.nc.GetLogger.Error undefined (type func() *logger.ReceptorLogger has no field or method Error)

Check failure on line 342 in pkg/workceptor/workceptor.go

View workflow job for this annotation

GitHub Actions / lint-receptor

w.nc.GetLogger.Error undefined (type func() *logger.ReceptorLogger has no field or method Error)

Check failure on line 342 in pkg/workceptor/workceptor.go

View workflow job for this annotation

GitHub Actions / lint-receptor

w.nc.GetLogger.Error undefined (type func() *logger.ReceptorLogger has no field or method Error)

Check failure on line 342 in pkg/workceptor/workceptor.go

View workflow job for this annotation

GitHub Actions / lint-receptor

w.nc.GetLogger.Error undefined (type func() *logger.ReceptorLogger has no field or method Error)

Check failure on line 342 in pkg/workceptor/workceptor.go

View workflow job for this annotation

GitHub Actions / lint-receptor

w.nc.GetLogger.Error undefined (type func() *logger.ReceptorLogger has no field or method Error)

Check failure on line 342 in pkg/workceptor/workceptor.go

View workflow job for this annotation

GitHub Actions / receptor (Go 1.21)

w.nc.GetLogger.Error undefined (type func() *logger.ReceptorLogger has no field or method Error)
}
w.workTypesLock.RLock()
wt, ok := w.workTypes[sfd.WorkType]
w.workTypesLock.RUnlock()
Expand Down

0 comments on commit 97957d1

Please sign in to comment.