Skip to content

Commit

Permalink
I no like indenting ;)
Browse files Browse the repository at this point in the history
  • Loading branch information
jayniz committed Sep 2, 2011
1 parent 712b259 commit 53cc3d6
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions lib/resque-ext/job.rb
Expand Up @@ -12,15 +12,12 @@ class Job
# after Resque::Job.create has called Resque.push # after Resque::Job.create has called Resque.push
# #
def self.create_with_loner(queue, klass, *args) def self.create_with_loner(queue, klass, *args)
if Resque.inline? return create_without_loner(queue, klass, *args) if Resque.inline?
create_without_loner(queue, klass, *args) item = { :class => klass.to_s, :args => args }
else return "EXISTED" if Resque::Plugins::Loner::Helpers.loner_queued?(queue, item)
item = { :class => klass.to_s, :args => args } job = create_without_loner(queue, klass, *args)
return "EXISTED" if Resque::Plugins::Loner::Helpers.loner_queued?(queue, item) Resque::Plugins::Loner::Helpers.mark_loner_as_queued(queue, item)
job = create_without_loner(queue, klass, *args) job
Resque::Plugins::Loner::Helpers.mark_loner_as_queued(queue, item)
job
end
end end


# #
Expand Down

0 comments on commit 53cc3d6

Please sign in to comment.