mirror of
https://github.com/keven1024/015.git
synced 2026-05-27 15:39:36 +00:00
12 lines
207 B
Go
12 lines
207 B
Go
package utils
|
|
|
|
import "github.com/hibiken/asynq"
|
|
|
|
func RedisURI2AsynqOpt(uri string) asynq.RedisConnOpt {
|
|
opt, err := asynq.ParseRedisURI(GetEnv("REDIS_URL"))
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return opt
|
|
}
|