mirror of
https://github.com/grassrootseconomics/cic-custodial.git
synced 2024-11-21 22:06:47 +01:00
fix: ununsed logg param
This commit is contained in:
parent
341a760f02
commit
0ef18b4e3e
@ -10,7 +10,6 @@ import (
|
|||||||
"github.com/grassrootseconomics/cic-custodial/internal/tasker/task"
|
"github.com/grassrootseconomics/cic-custodial/internal/tasker/task"
|
||||||
"github.com/grassrootseconomics/cic-custodial/pkg/redis"
|
"github.com/grassrootseconomics/cic-custodial/pkg/redis"
|
||||||
"github.com/hibiken/asynq"
|
"github.com/hibiken/asynq"
|
||||||
"github.com/zerodha/logf"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -32,7 +31,7 @@ func initTasker(custodialContainer *custodial.Custodial, redisPool *redis.RedisP
|
|||||||
taskerServer := tasker.NewTaskerServer(taskerServerOpts)
|
taskerServer := tasker.NewTaskerServer(taskerServerOpts)
|
||||||
|
|
||||||
taskerServer.RegisterMiddlewareStack([]asynq.MiddlewareFunc{
|
taskerServer.RegisterMiddlewareStack([]asynq.MiddlewareFunc{
|
||||||
observibilityMiddleware(lo),
|
observibilityMiddleware(),
|
||||||
})
|
})
|
||||||
|
|
||||||
taskerServer.RegisterHandlers(tasker.AccountPrepareTask, task.AccountPrepare(custodialContainer))
|
taskerServer.RegisterHandlers(tasker.AccountPrepareTask, task.AccountPrepare(custodialContainer))
|
||||||
@ -65,7 +64,7 @@ func retryHandler(count int, err error, task *asynq.Task) time.Duration {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func observibilityMiddleware(logg logf.Logger) asynq.MiddlewareFunc {
|
func observibilityMiddleware() asynq.MiddlewareFunc {
|
||||||
return func(handler asynq.Handler) asynq.Handler {
|
return func(handler asynq.Handler) asynq.Handler {
|
||||||
return asynq.HandlerFunc(func(ctx context.Context, task *asynq.Task) error {
|
return asynq.HandlerFunc(func(ctx context.Context, task *asynq.Task) error {
|
||||||
taskId, _ := asynq.GetTaskID(ctx)
|
taskId, _ := asynq.GetTaskID(ctx)
|
||||||
|
Loading…
Reference in New Issue
Block a user