contribsys / faktory

Language-agnostic persistent background job server
https://contribsys.com/faktory/
Other
5.76k stars 229 forks source link

Expose queue information on client #365

Closed robinvdvleuten closed 3 years ago

robinvdvleuten commented 3 years ago

Added method on client to expose information (the size) of all queues. Because of the loose structure of the info hash (map[string]interface{}), the size is a float64 instead of an int.

robinvdvleuten commented 3 years ago

@mperham I have made the typechecking more resilient and renamed the method to QueueSizes(). I can add a filter for queue names as argument, but what if the queue does not exist? Is it expected to return an empty map or set the name of the queue to 0?

mperham commented 3 years ago

Well done, thank you!