mirror of
https://github.com/hibiken/asynq.git
synced 2024-12-25 23:32:17 +08:00
Fix dash command flags
This commit is contained in:
parent
d0209d9273
commit
a04ba6411d
@ -39,6 +39,7 @@ var dashCmd = &cobra.Command{
|
||||
}
|
||||
dash.Run(dash.Options{
|
||||
PollInterval: flagPollInterval,
|
||||
RedisConnOpt: getRedisConnOpt(),
|
||||
})
|
||||
},
|
||||
}
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user