removed logs fails/retry since it is now handled by default in daos.Dao
This commit is contained in:
parent
007fcd36b8
commit
506bfca8b2
|
@ -333,19 +333,8 @@ func ActivityLogger(app core.App) echo.MiddlewareFunc {
|
||||||
model.RefreshUpdated()
|
model.RefreshUpdated()
|
||||||
|
|
||||||
routine.FireAndForget(func() {
|
routine.FireAndForget(func() {
|
||||||
attempts := 1
|
if err := app.LogsDao().SaveRequest(model); err != nil && app.IsDebug() {
|
||||||
|
log.Println("Log save failed:", err)
|
||||||
BeginSave:
|
|
||||||
logErr := app.LogsDao().SaveRequest(model)
|
|
||||||
if logErr != nil {
|
|
||||||
// try one more time after 10s in case of SQLITE_BUSY or "database is locked" error
|
|
||||||
if attempts <= 2 {
|
|
||||||
attempts++
|
|
||||||
time.Sleep(10 * time.Second)
|
|
||||||
goto BeginSave
|
|
||||||
} else if app.IsDebug() {
|
|
||||||
log.Println("Log save failed:", logErr)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete old request logs
|
// Delete old request logs
|
||||||
|
|
Loading…
Reference in New Issue