Stats errors in Sentry
All checks were successful
Unittests / unittests (push) Successful in 9s
Unittests / deploy-dev (push) Successful in 52s

This commit is contained in:
Adam Štrauch 2024-01-26 21:43:45 +01:00
parent 7a170e56d6
commit a3d0ee92ce
Signed by: cx
GPG key ID: 7262DAFE292BCE20

View file

@ -3,6 +3,7 @@ package glue
import (
"log"
"github.com/getsentry/sentry-go"
"github.com/jinzhu/gorm"
"github.com/rosti-cz/node-api/apps"
docker "github.com/rosti-cz/node-api/containers"
@ -102,6 +103,7 @@ func (s *StatsProcessor) GatherStats() error {
for _, app := range appList {
err := s.UpdateUsage(app.Name)
if err != nil {
sentry.CaptureException(err)
log.Println("STATS ERROR:", err.Error())
}
}
@ -120,6 +122,7 @@ func (s *StatsProcessor) GatherStates() error {
for _, app := range appList {
err := s.UpdateState(app.Name)
if err != nil {
sentry.CaptureException(err)
log.Println("STATE ERROR:", err.Error())
}
}