malthe/pq

Dashboard for PQ

marginalhours opened this issue ยท 3 comments

Hi,

This is not an issue with PQ itself, please close if not of interest!

I've recently created a dashboard for pq, imaginatively named pq-dashboard. The intention was to create something generic like rq-dashboard, which people use with rq. It's available via pip install pq-dashboard as you would expect. It supports inspecting queues and items, searching / deleting / requeueing items, and understands how the task API works.

I'm raising this issue just to bring the dashboard to your attention and in case you have any advice for further development / feature suggestions. Something I'd like to do (which rq-dashboard has) is expose which worker processes are processing queue items - but this might be hard to do generically since AFAIK postgres doesn't provide an easy way of seeing who's listening to pq_notify.

Thanks,

Tom

Hi Tom. Looks great โ€“ how about a screenshot? You can just drag any PNG into a Markdown field on Github and it'll upload an image.

For who's listening, that's a tricky one because even if there was a way to query that in PostgreSQL it would probably require superuser permission.

@malthe thanks for the tip - here's a screenshot:

Screenshot from 2021-08-09 08-22-20

Re. who's listening - cheers, you've saved me time trying to find a workaround. I think more heavyweight solutions are possible but not really in keeping with the unopinionated spirit of pq. ๐Ÿ‘

@MisterKeefe I suppose we could send a notification the other way โ€“ as a sort of health probe โ€“ such that every N seconds, each worker would send a notification that it's listening and the dashboard could pick that up if it subscribed to them using its own listener.

But at some point, you're probably better off using a proper monitoring system, e.g. https://prometheus.io/.