Skip to content
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

Merged
merged 5 commits into from
Nov 8, 2023

Conversation

moozzi
Copy link
Member

@moozzi moozzi commented Nov 6, 2023

#8

Copy link
Member

@postmodern postmodern left a 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"])
Copy link
Member

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"])
{
Copy link
Member

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.

@@ -1,5 +1,6 @@
# frozen_string_literal: true
require 'sidekiq'
require 'sidekiq/api'
Copy link
Member

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.

@postmodern
Copy link
Member

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.

@moozzi
Copy link
Member Author

moozzi commented Nov 7, 2023

Current design of this view may not be the best you've ever seen, but imo is enough for now.
I've also found out that our dark mode style needs some changes to work well with bulma styles (for example box class looks much better on light mode).

@moozzi moozzi marked this pull request as ready for review November 7, 2023 07:51
Copy link
Member

@postmodern postmodern left a 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>.

views/queue.erb Outdated Show resolved Hide resolved
views/queue.erb Outdated Show resolved Hide resolved
views/queue.erb Outdated Show resolved Hide resolved
views/queue.erb Outdated Show resolved Hide resolved
views/queue.erb Outdated Show resolved Hide resolved
views/queue.erb Outdated Show resolved Hide resolved
app.rb Outdated Show resolved Hide resolved
@postmodern postmodern merged commit 347c4cb into ronin-rb:main Nov 8, 2023
3 checks passed
@postmodern postmodern added the feature New Feature label Dec 4, 2023
@postmodern postmodern added this to the 0.1.0 milestone Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants