From 29bf540a34694bef56d6d74e66369bfa21b1667c Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Tue, 28 May 2013 14:56:46 -0400 Subject: [PATCH] Add the sidekiq-failures gem so that we can diagnose failed jobs --- Gemfile | 1 + Gemfile.lock | 6 ++++++ lib/jobs/clockwork_heartbeat.rb | 2 ++ 3 files changed, 9 insertions(+) diff --git a/Gemfile b/Gemfile index d6e46cf74cb..d5ade800bb2 100644 --- a/Gemfile +++ b/Gemfile @@ -59,6 +59,7 @@ gem 'sanitize' gem 'sass' gem 'seed-fu' gem 'sidekiq' +gem 'sidekiq-failures' gem 'sinatra', require: nil gem 'slim' # required for sidekiq-web gem 'strong_parameters' # remove when we upgrade to Rails 4 diff --git a/Gemfile.lock b/Gemfile.lock index 89761e8ee96..6096b8965c0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -422,6 +422,11 @@ GEM multi_json (~> 1) redis (~> 3) redis-namespace + sidekiq-failures (0.1.0) + sidekiq (>= 2.2.1) + sinatra + slim + sprockets simplecov (0.7.1) multi_json (~> 1.0) simplecov-html (~> 0.7.1) @@ -544,6 +549,7 @@ DEPENDENCIES seed-fu shoulda sidekiq + sidekiq-failures simple_handlebars_rails! simplecov sinatra diff --git a/lib/jobs/clockwork_heartbeat.rb b/lib/jobs/clockwork_heartbeat.rb index 10134ffbea9..8646af5eebe 100644 --- a/lib/jobs/clockwork_heartbeat.rb +++ b/lib/jobs/clockwork_heartbeat.rb @@ -1,6 +1,8 @@ module Jobs class ClockworkHeartbeat < Jobs::Base + sidekiq_options retry: false + def execute(args) $redis.set last_heartbeat_at_key, Time.now.to_i end