mirror of
https://github.com/keven1024/015.git
synced 2026-05-26 07:08:02 +00:00
12 lines
286 B
Go
12 lines
286 B
Go
package utils
|
|
|
|
import "github.com/hibiken/asynq"
|
|
|
|
func GetQueueClient() *asynq.Client {
|
|
return asynq.NewClient(asynq.RedisClientOpt{Addr: GetEnv("REDIS_URL")})
|
|
}
|
|
|
|
func GetQueueInspector() *asynq.Inspector {
|
|
return asynq.NewInspector(asynq.RedisClientOpt{Addr: GetEnv("REDIS_URL")})
|
|
}
|