diff --git a/tools/asynq/cmd/dash.go b/tools/asynq/cmd/dash.go index 5042d72..3ae0ed3 100644 --- a/tools/asynq/cmd/dash.go +++ b/tools/asynq/cmd/dash.go @@ -39,6 +39,7 @@ var dashCmd = &cobra.Command{ } dash.Run(dash.Options{ PollInterval: flagPollInterval, + RedisConnOpt: getRedisConnOpt(), }) }, } diff --git a/tools/asynq/cmd/dash/dash.go b/tools/asynq/cmd/dash/dash.go index 2f9f505..b1e93f8 100644 --- a/tools/asynq/cmd/dash/dash.go +++ b/tools/asynq/cmd/dash/dash.go @@ -91,6 +91,7 @@ func (s *State) DebugString() string { type Options struct { DebugMode bool PollInterval time.Duration + RedisConnOpt asynq.RedisConnOpt } func Run(opts Options) { @@ -108,7 +109,7 @@ func Run(opts Options) { var ( state = State{} // confined in this goroutine only; DO NOT SHARE - inspector = asynq.NewInspector(asynq.RedisClientOpt{Addr: ":6379"}) + inspector = asynq.NewInspector(opts.RedisConnOpt) ticker = time.NewTicker(opts.PollInterval) eventCh = make(chan tcell.Event)