Handle duration backfill row close errors
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
|||||||
"mal/internal/config"
|
"mal/internal/config"
|
||||||
"mal/internal/db"
|
"mal/internal/db"
|
||||||
"mal/internal/observability"
|
"mal/internal/observability"
|
||||||
|
"mal/pkg/errlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
type animeDurationRow struct {
|
type animeDurationRow struct {
|
||||||
@@ -62,7 +63,7 @@ WHERE duration_seconds IS NULL;
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("query anime rows missing duration_seconds: %w", err)
|
return nil, fmt.Errorf("query anime rows missing duration_seconds: %w", err)
|
||||||
}
|
}
|
||||||
defer func() { _ = rows.Close() }()
|
defer errlog.Close(rows, "failed to close anime duration backfill rows")
|
||||||
|
|
||||||
var toUpdate []animeDurationRow
|
var toUpdate []animeDurationRow
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
|
|||||||
Reference in New Issue
Block a user