Disable extensions when Resque.inline? == true #12

Merged
merged 1 commit into from Sep 2, 2011

Conversation

Projects
None yet
2 participants
@arthurdandrea
Contributor

arthurdandrea commented Aug 5, 2011

There is no point in ensuring that jobs are unique if there are only one job executing at a time. This fixes specs and tests that depend on Resque.inline? == true.

disable extensions if Resque.inline? fix #11
if Resque.inline? jobs are executed inline (duh) and there is no concurrency, no resque-loner
- job = create_without_loner(queue, klass, *args)
- Resque::Plugins::Loner::Helpers.mark_loner_as_queued(queue, item)
- job
+ if Resque.inline?

This comment has been minimized.

Show comment Hide comment
@jayniz

jayniz Aug 15, 2011

Contributor

I'd personally do it like this:

def self.create_with_loner(queue, klass, *args)
  return create_without_loner(queue, klass, *args) if Resque.inline?
  ...
end

But will merge like that unless you want to change it ;)

@jayniz

jayniz Aug 15, 2011

Contributor

I'd personally do it like this:

def self.create_with_loner(queue, klass, *args)
  return create_without_loner(queue, klass, *args) if Resque.inline?
  ...
end

But will merge like that unless you want to change it ;)

jayniz added a commit that referenced this pull request Sep 2, 2011

Merge pull request #12 from arthurdandrea/master
Disable extensions when Resque.inline? == true

@jayniz jayniz merged commit 712b259 into resque:master Sep 2, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment