-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add route for inspecting sidekiq jobs #63
Add route for inspecting sidekiq jobs #63
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor style changes.
app.rb
Outdated
args: payload["args"], | ||
created_at: Time.at(payload["created_at"]), | ||
enqueued_at: Time.at(payload["enqueued_at"]), | ||
run_at: Time.at(worker["run_at"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vertically align the values of the Hash.
get '/queue' do | ||
@workers = Sidekiq::Workers.new.map do |_p, _t, worker| | ||
payload = JSON.parse(worker["payload"]) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a newline between 774 and 775.
config/sidekiq.rb
Outdated
@@ -1,5 +1,6 @@ | |||
# frozen_string_literal: true | |||
require 'sidekiq' | |||
require 'sidekiq/api' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this require into app.rb
, since that's the only play we use the Sidekiq::API
.
This is awesome. I'll open separate tickets for some other ideas, like listing currently running jobs at the top, or adding a JavaScript async refresh. |
Current design of this view may not be the best you've ever seen, but imo is enough for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed a few things about block variable names and using <b>
instead of <strong>
.
#8