hibiken / asynqmon

Web UI for Asynq task queue
MIT License
609 stars 133 forks source link

support redis sentinel config#added #240

Closed linhbkhn95 closed 2 years ago

linhbkhn95 commented 2 years ago

Background Currently, Redis v8 doesn't support passing Redis sentinels via URL as I know from their code.

func ParseURL(redisURL string) (*Options, error) {
    u, err := url.Parse(redisURL)
    if err != nil {
        return nil, err
    }

    switch u.Scheme {
    case "redis", "rediss":
        return setupTCPConn(u)
    case "unix":
        return setupUnixConn(u)
    default:
        return nil, fmt.Errorf("redis: invalid URL scheme: %s", u.Scheme)
    }
}

So, As the author @hibiken mentioned in https://github.com/hibiken/asynqmon/issues/235 will not perform for Redis sentinels, terminal will show an error as Redis v8 defined redis: invalid URL scheme redis+sentinel

Why did we need it?

fixed https://github.com/hibiken/asynqmon/issues/235

hibiken commented 2 years ago

@linhbkhn95 Thanks for the PR! I've already started working on a fix and I just created a PR with that branch #241 (sorry for not communicating sooner 🙏 )

Reason for closing this PR: