lib/bolt/executor.rb in bolt-0.21.3 vs lib/bolt/executor.rb in bolt-0.21.4
- old
+ new
@@ -16,15 +16,14 @@
module Bolt
class Executor
attr_reader :noop, :transports
attr_accessor :run_as, :plan_logging
- def initialize(config = Bolt::Config.new,
+ def initialize(concurrency = 1,
analytics = Bolt::Analytics::NoopClient.new,
noop = nil,
bundled_content: nil)
- @config = config
@analytics = analytics
@bundled_content = bundled_content
@logger = Logging.logger[self]
@plan_logging = false
@@ -35,11 +34,11 @@
end
@reported_transports = Set.new
@noop = noop
@run_as = nil
- @pool = Concurrent::ThreadPoolExecutor.new(max_threads: @config[:concurrency])
- @logger.debug { "Started with #{@config[:concurrency]} max thread(s)" }
+ @pool = Concurrent::ThreadPoolExecutor.new(max_threads: concurrency)
+ @logger.debug { "Started with #{concurrency} max thread(s)" }
@notifier = Bolt::Notifier.new
end
def transport(transport)
impl = @transports[transport || 'ssh']