Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
raw
history blame contribute delete
512 Bytes
package statusmgr
import (
"context"
"database/sql"
"github.com/riverqueue/river"
"github.com/target/goalert/gadb"
)
type CleanupArgs struct{}
func (CleanupArgs) Kind() string { return "status-manager-cleanup" }
// cleanup is a worker function that will remove any stale subscriptions.
func (db *DB) cleanup(ctx context.Context, j *river.Job[CleanupArgs]) error {
return db.lock.WithTxShared(ctx, func(ctx context.Context, tx *sql.Tx) error {
return gadb.New(tx).StatusMgrCleanupStaleSubs(ctx)
})
}