-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 pagination to "Busy" page #5556
Conversation
744470d
to
0eb1859
Compare
lib/sidekiq/paginator.rb
Outdated
@@ -2,14 +2,21 @@ | |||
|
|||
module Sidekiq | |||
module Paginator | |||
def page(key, pageidx = 1, page_size = 25, opts = nil) | |||
def page(key_or_items, pageidx = 1, page_size = 25, opts = nil) |
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.
Break this codepath out into a separate method, page_items
or page_enum
.
lib/sidekiq/web/application.rb
Outdated
@@ -74,6 +74,9 @@ def self.set(key, val) | |||
end | |||
|
|||
get "/busy" do | |||
@count = (params["count"] || 25).to_i |
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.
WDYT about increasing the default page size to 100 so the user's not paginating as much, given that it's a bit slow?
0eb1859
to
97f3ccb
Compare
Thanks, @mperham. Agreed with the suggestions. |
We're seeing an error when visiting the Busy page after this change:
Maybe |
@ngan Please provide the full backtrace. |
Apologies, this might be something on our end. We're investigating further. If it's a bug on Sidekiq's side, I'll report back with lots more information. |
Closes #5555.
The pagination is slower (compared to
/retries
etc pages), because we need to get all of the entries to sort them (byrun_at
) before returning. But now this loads with no problems.Seems like it is also problematic to add mass actions like "Kill"/"Delete", because we will need to inefficiently iterate over the large list
list
(compared to/retries
page where we can efficiently remove from thezset
).You mentioned filtering in the issue. This is Pro/Ent feature, right? So I have not access to it. Better to be implemented by you or someone else who has access.