mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-25 01:03:32 -06:00
test the media manager a bit, add shutdown logic
This commit is contained in:
parent
0ef478584c
commit
e0f9323b9a
37 changed files with 688 additions and 354 deletions
|
|
@ -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())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue