1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Changes for the upcoming Pro filtering feature

This commit is contained in:
Mike Perham 2013-11-10 12:39:14 -08:00
parent f243b96fd2
commit 9e2c6acc4f
4 changed files with 32 additions and 8 deletions

View file

@ -6,8 +6,26 @@ Please see http://sidekiq.org/pro for more details and how to buy.
HEAD
-----------
This release offers new functionality based on the SCAN command newly
added to Redis 2.8.
- Job Filtering in the Web UI!
You can now filter retries and scheduled jobs in the Web UI so you
only see the jobs relevant to your needs. Queues cannot be filtered;
Redis does not provide the same SCAN operation on the LIST type.
- SCAN support in the Sidekiq::SortedSet API. Here's an example that
finds all jobs which contain the substring "Warehouse::OrderShip"
and deletes all matching retries. If the set is large, this API
will be much faster than standard iteration using each.
```ruby
Sidekiq::RetrySet.new.scan("Warehouse::OrderShip") do |entry|
entry.delete
end
```
- Sidekiq::Batch#jobs now returns the set of JIDs added to the batch.
- Sidekiq::Batch#jids returns the complete set of JIDs associated with the batch.
- Pro now requires 2.17.0
1.2.5
-----------

View file

@ -16,6 +16,10 @@ module Sidekiq
end
end
# This is a hook for a Sidekiq Pro feature. Please don't touch.
def filtering(*)
end
def locale
lang = (request.env["HTTP_ACCEPT_LANGUAGE"] || 'en')[0,2]
strings[lang] ? lang : 'en'

View file

@ -2,11 +2,12 @@
<div class="col-sm-5">
<h3><%= t('Retries') %></h3>
</div>
<div class="col-sm-4">
<% if @retries.size > 0 %>
<% if @retries.size > 0 && @total_size > @count %>
<div class="col-sm-4">
<%= erb :_paging, :locals => { :url => "#{root_path}retries" } %>
<% end %>
</div>
</div>
<% end %>
<%= filtering('retries') %>
</header>
<% if @retries.size > 0 %>

View file

@ -2,11 +2,12 @@
<div class="col-sm-5">
<h3><%= t('ScheduledJobs') %></h3>
</div>
<div class="col-sm-4">
<% if @scheduled.size > 0 %>
<% if @scheduled.size > 0 && @total_size > @count %>
<div class="col-sm-4">
<%= erb :_paging, :locals => { :url => "#{root_path}scheduled" } %>
<% end %>
</div>
</div>
<% end %>
<%= filtering('scheduled') %>
</header>
<% if @scheduled.size > 0 %>