mirror of
https://github.com/hibiken/asynq.git
synced 2024-11-10 11:31:58 +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{
|
dash.Run(dash.Options{
|
||||||
PollInterval: flagPollInterval,
|
PollInterval: flagPollInterval,
|
||||||
|
RedisConnOpt: getRedisConnOpt(),
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -91,6 +91,7 @@ func (s *State) DebugString() string {
|
|||||||
type Options struct {
|
type Options struct {
|
||||||
DebugMode bool
|
DebugMode bool
|
||||||
PollInterval time.Duration
|
PollInterval time.Duration
|
||||||
|
RedisConnOpt asynq.RedisConnOpt
|
||||||
}
|
}
|
||||||
|
|
||||||
func Run(opts Options) {
|
func Run(opts Options) {
|
||||||
@ -108,7 +109,7 @@ func Run(opts Options) {
|
|||||||
var (
|
var (
|
||||||
state = State{} // confined in this goroutine only; DO NOT SHARE
|
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)
|
ticker = time.NewTicker(opts.PollInterval)
|
||||||
|
|
||||||
eventCh = make(chan tcell.Event)
|
eventCh = make(chan tcell.Event)
|
||||||
|
Loading…
Reference in New Issue
Block a user