feat: update provider

This commit is contained in:
Rogee
2025-05-13 14:31:44 +08:00
parent 2cf3b858b7
commit bd9e4df231
3 changed files with 16 additions and 2 deletions

View File

@@ -13,6 +13,18 @@ import (
)
func Provide(opts ...opt.Option) error {
if err := container.Container.Provide(func(
__job *job.Job,
) (contracts.Initial, error) {
obj := &BalancePayNotifyWorker{}
if err := river.AddWorkerSafely(__job.Workers, obj); err != nil {
return nil, err
}
return obj, nil
}, atom.GroupInitial); err != nil {
return err
}
if err := container.Container.Provide(func(
__job *job.Job,
) (contracts.Initial, error) {