Upgrade to kit v0.3.0

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2026-04-03 10:56:06 +02:00
parent 8adf26ad20
commit f17fb7bf49
191 changed files with 1617 additions and 1617 deletions

View File

@@ -127,7 +127,7 @@ func (w *SourceFetchWorker) processNext(
if err := w.pg.WithTx(
nonCancelableCtx,
func(tx pg.Conn) error {
func(ctx context.Context, tx pg.Tx) error {
if err := sourceFetch.LoadNextQueuedForUpdateSkipLocked(nonCancelableCtx, tx); err != nil {
return err // sentinel errors checked by caller
}
@@ -212,7 +212,7 @@ func (w *SourceFetchWorker) recoverStaleRows(ctx context.Context) {
err := w.pg.WithTx(
ctx,
func(tx pg.Conn) error {
func(ctx context.Context, tx pg.Tx) error {
var fetches coredata.AccessReviewCampaignSourceFetches
count, err := fetches.RecoverStale(ctx, tx, staleThreshold, now)
if err != nil {
@@ -251,10 +251,10 @@ func (w *SourceFetchWorker) commitFailedSourceFetch(
sourceFetch.CompletedAt = new(now)
sourceFetch.UpdatedAt = now
return w.pg.WithConn(
return w.pg.WithTx(
ctx,
func(conn pg.Conn) error {
return sourceFetch.Update(ctx, conn, scope)
func(ctx context.Context, tx pg.Tx) error {
return sourceFetch.Update(ctx, tx, scope)
},
)
}
@@ -275,10 +275,10 @@ func (w *SourceFetchWorker) commitSuccessfulSourceFetch(
sourceFetch.CompletedAt = new(now)
sourceFetch.UpdatedAt = now
return w.pg.WithConn(
return w.pg.WithTx(
ctx,
func(conn pg.Conn) error {
return sourceFetch.Update(ctx, conn, scope)
func(ctx context.Context, tx pg.Tx) error {
return sourceFetch.Update(ctx, tx, scope)
},
)
}
@@ -292,7 +292,7 @@ func (w *SourceFetchWorker) finalizeCampaignFetchLifecycle(
return w.pg.WithTx(
ctx,
func(tx pg.Conn) error {
func(ctx context.Context, tx pg.Tx) error {
if err := lockCampaignForUpdate(ctx, tx, scope, campaignID); err != nil {
return fmt.Errorf("cannot lock campaign: %w", err)
}