Last active
April 23, 2016 16:19
-
-
Save jberger/350cde8b608466c142c39364c9306257 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
queues.queue, | |
states.state, | |
(select count(*) from minion_jobs where queue = queues.queue and state::text = states.state) as c | |
from (select distinct queue from minion_jobs) as queues | |
cross join (values ('active'), ('failed'), ('finished'), ('inactive')) as states(state); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment