Permalink
Browse files

Using the original Resque::Job.create return value in resque-ext/job.rb

  • Loading branch information...
1 parent d6fdac2 commit c7477f4458c56da7f233777ec64c7baaf1098951 @mateusdelbianco mateusdelbianco committed Sep 3, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/resque-ext/job.rb
View
@@ -16,10 +16,12 @@ def self.create_with_loner(queue, klass, *args)
item = { :class => klass.to_s, :args => args }
return "EXISTED" if Resque::Plugins::Loner::Helpers.loner_queued?(queue, item)
# multi block returns array of keys
+ create_return_value = false
Resque.redis.multi do
- create_without_loner(queue, klass, *args)
+ create_return_value = create_without_loner(queue, klass, *args)
Resque::Plugins::Loner::Helpers.mark_loner_as_queued(queue, item)
end.first
+ create_return_value
end
#

0 comments on commit c7477f4

Please sign in to comment.