This commit is contained in:
tobi 2025-09-29 12:02:19 +02:00 committed by tobi
commit 5c000620e2

View file

@ -92,7 +92,7 @@ func init() {
Column("id"). Column("id").
Where("? < ?", bun.Ident("id"), maxID). Where("? < ?", bun.Ident("id"), maxID).
OrderExpr("? DESC", bun.Ident("id")). OrderExpr("? DESC", bun.Ident("id")).
Limit(250). Limit(1000).
Scan(ctx); err != nil && !errors.Is(err, sql.ErrNoRows) { Scan(ctx); err != nil && !errors.Is(err, sql.ErrNoRows) {
return gtserror.Newf("error selecting unthreaded statuses: %w", err) return gtserror.Newf("error selecting unthreaded statuses: %w", err)
} }
@ -137,13 +137,13 @@ func init() {
log.Infof( log.Infof(
ctx, ctx,
"[~%.0f rows/s; updated %d total rows] migrated ~%.2f%% of statuses", "[~%.0f rows/s; updated %d total rows] migrated ~%.2f%% of statuses",
updatedRowsTotal, rowsPerSecond, percentDone, rowsPerSecond, updatedRowsTotal, percentDone,
) )
} else { } else {
log.Infof( log.Infof(
ctx, ctx,
"[~%.0f rows/s; updated %d total rows] almost done... ", "[~%.0f rows/s; updated %d total rows] almost done... ",
updatedRowsTotal, rowsPerSecond, rowsPerSecond, updatedRowsTotal,
) )
} }
} }