MSP-6078 update deps
This commit is contained in:
1 parent
3f65b11a65
commit
df693c0294
4 files changed
+107
-103
No files matched your search
@@ -6,6 +6,7 @@ import (
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/txix-open/bgjob"
|
||||
"github.com/txix-open/isp-kit/bgjobx/handler"
|
||||
"github.com/txix-open/isp-kit/log"
|
||||
"msp-admin-service/conf"
|
||||
)
|
||||
@@ -38,13 +39,13 @@ func NewService(
|
||||
}
|
||||
}
|
||||
|
||||
func (s Service) Handle(ctx context.Context, _ bgjob.Job) bgjob.Result {
|
||||
func (s Service) Handle(ctx context.Context, _ bgjob.Job) handler.Result {
|
||||
err := s.deleteOldAudit(ctx)
|
||||
if err != nil {
|
||||
return bgjob.Retry(defaultRetryTimeout, errors.WithMessage(err, "sync state with worker"))
|
||||
return handler.Retry(defaultRetryTimeout, errors.WithMessage(err, "sync state with worker"))
|
||||
}
|
||||
|
||||
return bgjob.Reschedule(s.syncPeriod)
|
||||
return handler.Reschedule(s.syncPeriod)
|
||||
}
|
||||
|
||||
func (s Service) deleteOldAudit(ctx context.Context) error {
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/txix-open/bgjob"
|
||||
"github.com/txix-open/isp-kit/bgjobx/handler"
|
||||
"github.com/txix-open/isp-kit/log"
|
||||
"msp-admin-service/conf"
|
||||
"msp-admin-service/entity"
|
||||
@@ -54,15 +55,15 @@ func NewInactiveBlocker(
|
||||
}
|
||||
}
|
||||
|
||||
func (w Service) Handle(ctx context.Context, _ bgjob.Job) bgjob.Result {
|
||||
func (w Service) Handle(ctx context.Context, _ bgjob.Job) handler.Result {
|
||||
ctx = log.ToContext(ctx, log.String("worker", "inactiveBlocker"))
|
||||
w.logger.Debug(ctx, "begin work")
|
||||
err := w.do(ctx)
|
||||
if err != nil {
|
||||
return bgjob.Retry(defaultRetryTimeout, errors.WithMessage(err, "sync state with worker"))
|
||||
return handler.Retry(defaultRetryTimeout, errors.WithMessage(err, "sync state with worker"))
|
||||
}
|
||||
w.logger.Debug(ctx, "end work")
|
||||
return bgjob.Reschedule(w.syncPeriod)
|
||||
return handler.Reschedule(w.syncPeriod)
|
||||
}
|
||||
|
||||
func (w Service) do(ctx context.Context) error {
|
||||
|
||||
Reference in new issue
Block a user