test the media manager a bit, add shutdown logic

This commit is contained in:
tsmethurst 2022-01-10 18:36:09 +01:00
commit e0f9323b9a
37 changed files with 688 additions and 354 deletions

View file

@ -20,7 +20,6 @@ package bundb
import (
"context"
"database/sql"
"time"
"github.com/sirupsen/logrus"
@ -48,13 +47,5 @@ func (q *debugQueryHook) AfterQuery(_ context.Context, event *bun.QueryEvent) {
"operation": event.Operation(),
})
if event.Err != nil && event.Err != sql.ErrNoRows {
// if there's an error the it'll be handled in the application logic,
// but we can still debug log it here alongside the query
l = l.WithField("query", event.Query)
l.Debug(event.Err)
return
}
l.Tracef("[%s] %s", dur, event.Operation())
}