2
0
mirror of https://github.com/hibiken/asynq.git synced 2024-11-10 11:31:58 +08:00

Add Close to Inspector

This commit is contained in:
Ken Hibino 2020-09-08 06:52:34 -07:00
parent 69d7ec725a
commit a293efcdab
2 changed files with 6 additions and 1 deletions

View File

@ -235,7 +235,7 @@ type Result struct {
Deadline time.Time Deadline time.Time
} }
// Close closes the connection with redis server. // Close closes the connection with redis.
func (c *Client) Close() error { func (c *Client) Close() error {
return c.rdb.Close() return c.rdb.Close()
} }

View File

@ -27,6 +27,11 @@ func NewInspector(r RedisConnOpt) *Inspector {
} }
} }
// Close closes the connection with redis.
func (i *Inspector) Close() error {
return i.rdb.Close()
}
// Queues returns a list of all queue names. // Queues returns a list of all queue names.
func (i *Inspector) Queues() ([]string, error) { func (i *Inspector) Queues() ([]string, error) {
return i.rdb.AllQueues() return i.rdb.AllQueues()