Closed strzibny closed 3 years ago
Thanks for asking!
I've put a little thought into it, but nothing firmly held:
I don't have a lot of experience building and securing Rails Engines or the like, but would welcome contributions that are inline with the thoughts above. And also welcome to start small, eg a table of worked jobs. Or a simple chart. Release it and iterate.
There are differential user stories here according to scale. Many users will be satisfied with a minimal interface, for which delayed_job_web is my own reference point, but anyone coming from a large Sidekiq install will bring more sophisticated preferences.
I have started testing out GoodJob for one of our production applications, if all goes well with testing, I would be glad to take on/help with this project.
Thanks @gadimbaylisahil! I hope it goes well 😓
This feature is next up in the backlog. I wanted to start flushing it out. Iterative development is great, all of these features are not expected to land together.
Table of enqueued jobs: Note: GoodJob creates a new job record when a job errors and is retried. e.g. there will exist multiple GoodJob::Job IDs/records for the same ActiveJob ID. Some kind of grouping would be nice to have, but not necessary initially.
Columns:
Charts.
SELECT
queue_name,
date_trunc('hour', CAST(performed_at AS timestamp)) AS performed_at,
EXTRACT(epoch FROM avg(latency)) AS avg
FROM (
SELECT
(performed_at - scheduled_at) AS latency,
finished_at AS finished_at,
performed_at AS performed_at,
queue_name AS queue_name
FROM good_jobs
) source
WHERE finished_at IS NOT NULL
GROUP BY date_trunc('hour', CAST(performed_at AS timestamp)), queue_name
ORDER BY queue_name ASC, date_trunc('hour', CAST(performed_at AS timestamp)) ASC
In regards to packaging , I would like to see the dashboard included in GoodJob (not in a separate gem). I think that would imply it is a mountable Rails Engine. Packaging it together ensures compatibility and makes integration testing much easier.
i would like to see the dashboard implemented without additional dependencies beyond what is available with Vanilla Rails. I'm not sure what the current status is of sprockets/webpacker for Rails Engines, so simply inlining CSS/JS assets is perfectly acceptable for now. Boring HTML, simple and modern CSS (flexbox, grid) are perfectly acceptable. I've done some research on lightweight charting tools and Chartist.js looks fine.
Getting Started: a first PR could simply implement a table with the most recent 100 jobs. That would be an excellent start.
GoodJob now has a functional web dashboard 🎉 . It can always use improvements, but I think the goals of this issue have been achieved 🙌 https://github.com/bensheldon/good_job#dashboard
Is UI similar to Sidekiq UI available or planned?