1
0
Fork 0

Add cli status handler

This commit is contained in:
Gregory Eremin 2014-09-16 16:21:37 +04:00
parent c684076ff1
commit 9bf0f9f65d
1 changed files with 13 additions and 0 deletions

View File

@ -92,6 +92,19 @@ func main() {
}
},
},
{
Name: "status",
Usage: "Show server status",
Action: func(c *cli.Context) {
stat := bsq.Status()
for _, queue := range stat {
fmt.Println(queue.Name)
fmt.Println(" Messages:", queue.Messages)
fmt.Println(" Subscribers:", queue.Subscribers)
}
},
},
}
app.CommandNotFound = func(c *cli.Context, cmd string) {