fix: issues

This commit is contained in:
rogeecn
2025-03-21 19:25:58 +08:00
parent e51acee8d8
commit 0015e2eee2
4 changed files with 17 additions and 41 deletions

View File

@@ -8,13 +8,11 @@ import (
. "github.com/riverqueue/river"
log "github.com/sirupsen/logrus"
_ "go.ipao.vip/atom"
"go.ipao.vip/atom/contracts"
_ "go.ipao.vip/atom/contracts"
)
var (
_ JobArgs = SortArgs{}
_ JobArgsWithInsertOpts = SortArgs{}
)
var _ contracts.JobArgs = SortArgs{}
type SortArgs struct {
Strings []string `json:"strings"`
@@ -27,9 +25,8 @@ func (s SortArgs) InsertOpts() InsertOpts {
}
}
func (SortArgs) Kind() string {
return "sort"
}
func (SortArgs) Kind() string { return "sort" }
func (a SortArgs) UniqueID() string { return a.Kind() }
var _ Worker[SortArgs] = (*SortWorker)(nil)

View File

@@ -2,7 +2,6 @@ package job
import (
"context"
"quyun/providers/postgres"
"sync"
"{{.ModuleName}}/providers/postgres"
@@ -18,18 +17,6 @@ import (
"go.ipao.vip/atom/container"
"go.ipao.vip/atom/contracts"
"go.ipao.vip/atom/opt"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgxpool"
"github.com/pkg/errors"
"github.com/riverqueue/river"
"github.com/riverqueue/river/riverdriver/riverpgxv5"
"github.com/riverqueue/river/rivertype"
"github.com/samber/lo"
log "github.com/sirupsen/logrus"
"go.ipao.vip/atom/container"
"go.ipao.vip/atom/contracts"
"go.ipao.vip/atom/opt"
)
func Provide(opts ...opt.Option) error {