From a04ba6411dde1487afd79da42ec7651b8e2aa373 Mon Sep 17 00:00:00 2001 From: Ken Hibino Date: Wed, 22 Jun 2022 20:57:11 -0700 Subject: [PATCH] Fix dash command flags --- tools/asynq/cmd/dash.go | 1 + tools/asynq/cmd/dash/dash.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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)