lib/sidekiq/expected_failures/web.rb in sidekiq-expected_failures-0.2.0 vs lib/sidekiq/expected_failures/web.rb in sidekiq-expected_failures-0.2.1
- old
+ new
@@ -19,9 +19,18 @@
end
redirect "#{root_path}expected_failures"
end
+ app.get "/expected_failures/stats" do
+ @counters = Sidekiq::ExpectedFailures.counters
+
+ content_type :json
+ Sidekiq.dump_json({
+ failures: @counters
+ })
+ end
+
app.get "/expected_failures/?:date?" do
@dates = Sidekiq::ExpectedFailures.dates
@count = (params[:count] || 50).to_i
if @dates