Skip to content

Commit

Permalink
Remove BJob#interactive since that's Batch's concern.
Browse files Browse the repository at this point in the history
  • Loading branch information
djanowski committed Jun 5, 2013
1 parent a7f8cbb commit b2e4502
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 18 deletions.
20 changes: 2 additions & 18 deletions lib/bjob.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,8 @@ def self.run(filter = nil)
instance = new

instance.batch(instance.items(filter)) do |items|
if BJob.interactive?
Batch.each(items) do |item|
instance.process(item)
end
else
items.each do |item|
instance.process(item)
end
Batch.each(items) do |item|
instance.process(item)
end
end
end
Expand All @@ -55,14 +49,4 @@ def initialize(size, &block)
super(&block)
end
end

def self.interactive=(value)
@interactive = value
end

def self.interactive?
!! @interactive
end

self.interactive = false
end
2 changes: 2 additions & 0 deletions test/prelude.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

require_relative "../lib/bjob"

ENV["BATCH_INTERACTIVE"] = "0"

$VERBOSE = 1

0 comments on commit b2e4502

Please sign in to comment.