From a9e52528c149d50417340c4cffab03dd34ef0fed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonne=20Ha=C3=9F?= Date: Sat, 1 Jun 2013 20:26:25 +0200 Subject: [PATCH] bump sidekiq --- Gemfile | 3 +-- Gemfile.lock | 31 +++++++++++++------------------ lib/postzord/dispatcher.rb | 5 +++++ 3 files changed, 19 insertions(+), 20 deletions(-) diff --git a/Gemfile b/Gemfile index 5c52d0c55..af3d8f8b9 100644 --- a/Gemfile +++ b/Gemfile @@ -17,9 +17,8 @@ gem 'devise', '3.0.2' # Background processing -gem 'sidekiq', '2.11.1' +gem 'sidekiq', '2.17.0' gem 'sinatra', '1.3.3' -gem 'slim', '1.3.9' # Configuration diff --git a/Gemfile.lock b/Gemfile.lock index 635a0394a..f427e3823 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -55,8 +55,8 @@ GEM activemodel (>= 3.2.0) activesupport (>= 3.2.0) json (>= 1.7) - celluloid (0.13.0) - timers (>= 1.0.0) + celluloid (0.15.2) + timers (~> 1.1.0) childprocess (0.3.9) ffi (~> 1.0, >= 1.0.11) chunky_png (1.2.8) @@ -76,7 +76,7 @@ GEM compass-rails (1.0.3) compass (>= 0.12.2, < 0.14) configurate (0.0.8) - connection_pool (1.0.0) + connection_pool (1.2.0) crack (0.4.0) safe_yaml (~> 0.9.0) cucumber (1.3.5) @@ -325,9 +325,9 @@ GEM rdoc (3.12.2) json (~> 1.4) redcarpet (3.0.0) - redis (3.0.4) - redis-namespace (1.3.1) - redis (~> 3.0.0) + redis (3.0.6) + redis-namespace (1.4.1) + redis (~> 3.0.4) remotipart (1.2.1) rmagick (2.13.2) roxml (3.1.6) @@ -364,12 +364,12 @@ GEM multi_json (~> 1.0) rubyzip websocket (~> 1.0.4) - sidekiq (2.11.1) - celluloid (~> 0.13.0) - connection_pool (~> 1.0) - multi_json (~> 1) - redis (~> 3) - redis-namespace + sidekiq (2.17.0) + celluloid (>= 0.15.2) + connection_pool (>= 1.0.0) + json + redis (>= 3.0.4) + redis-namespace (>= 1.3.1) simple_oauth (0.2.0) sinatra (1.3.3) rack (~> 1.3, >= 1.3.6) @@ -377,9 +377,6 @@ GEM tilt (~> 1.3, >= 1.3.3) sinon-rails (1.7.3) railties (>= 3.1) - slim (1.3.9) - temple (~> 0.6.3) - tilt (~> 1.3, >= 1.3.3) slop (3.4.6) spork (1.0.0rc3) sprockets (2.2.2) @@ -392,7 +389,6 @@ GEM activemodel (~> 3.0) railties (~> 3.0) subexec (0.2.3) - temple (0.6.6) test_after_commit (0.2.0) thor (0.18.1) tilt (1.4.1) @@ -496,10 +492,9 @@ DEPENDENCIES ruby-oembed (= 0.8.9) sass-rails (= 3.2.6) selenium-webdriver (= 2.34.0) - sidekiq (= 2.11.1) + sidekiq (= 2.17.0) sinatra (= 1.3.3) sinon-rails (= 1.7.3) - slim (= 1.3.9) spork (= 1.0.0rc3) strong_parameters test_after_commit (= 0.2.0) diff --git a/lib/postzord/dispatcher.rb b/lib/postzord/dispatcher.rb index 01ead3da0..ace975752 100644 --- a/lib/postzord/dispatcher.rb +++ b/lib/postzord/dispatcher.rb @@ -40,6 +40,11 @@ class Postzord::Dispatcher if opts[:additional_subscribers].present? opts[:additional_subscribers] = [*opts[:additional_subscribers]].map(&:id) end + + if opts[:to].present? + opts[:to] = [*opts[:to]].map {|e| e.respond_to?(:id) ? e.id : e } + end + Workers::DeferredDispatch.perform_async(user.id, object.class.to_s, object.id, opts) end