Skip to content
This repository has been archived by the owner on Sep 3, 2019. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Cleaned up whitespace.
  • Loading branch information
Michael van Rooijen committed May 1, 2011
1 parent 32011c4 commit ac5196e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/hirefire/configuration.rb
Expand Up @@ -8,7 +8,7 @@ class Configuration
# #
# @return [Fixnum] default: 1 # @return [Fixnum] default: 1
attr_accessor :max_workers attr_accessor :max_workers

## ##
# Contains the min amount of workers that should always be running # Contains the min amount of workers that should always be running
# #
Expand Down
2 changes: 1 addition & 1 deletion lib/hirefire/environment/base.rb
Expand Up @@ -189,7 +189,7 @@ def log_and_hire(amount)
def max_workers def max_workers
HireFire.configuration.max_workers HireFire.configuration.max_workers
end end

## ##
# Wrapper method for HireFire.configuration # Wrapper method for HireFire.configuration
# Returns the min amount of workers that should always be running # Returns the min amount of workers that should always be running
Expand Down
4 changes: 2 additions & 2 deletions spec/environment_spec.rb
Expand Up @@ -100,12 +100,12 @@ def jobs=(amount)
base.expects(:workers).with(0).once base.expects(:workers).with(0).once
base.fire base.fire
end end

it 'should set the workers to minimum workers when there arent any jobs' do it 'should set the workers to minimum workers when there arent any jobs' do
base.jobs = 0 base.jobs = 0
base.workers = 10 base.workers = 10
base.stubs(:min_workers).returns(2) base.stubs(:min_workers).returns(2)

HireFire::Logger.expects(:message).with('All queued jobs have been processed. Setting workers to 2.') HireFire::Logger.expects(:message).with('All queued jobs have been processed. Setting workers to 2.')
base.expects(:workers).with(2).once base.expects(:workers).with(2).once
base.fire base.fire
Expand Down

0 comments on commit ac5196e

Please sign in to comment.