Module: WarmBlanket

Extended by:
Dry::Configurable
Defined in:
lib/warm_blanket/version.rb,
lib/warm-blanket.rb,
lib/warm_blanket/requester.rb,
lib/warm_blanket/orchestrator.rb,
lib/warm_blanket/wait_for_port.rb

Overview

frozen_string_literal: true

Defined Under Namespace

Classes: Orchestrator, Requester, WaitForPort

Constant Summary collapse

VERSION =
'1.1.0'

Class Method Summary collapse

Class Method Details

.trigger_warmup(logger: WarmBlanket.config.logger, orchestrator_factory: Orchestrator) ⇒ Object



53
54
55
56
57
58
59
60
# File 'lib/warm-blanket.rb', line 53

def self.trigger_warmup(logger: WarmBlanket.config.logger, orchestrator_factory: Orchestrator)
  unless [true, 'true', '1'].include?(WarmBlanket.config.enabled)
    logger.info "WarmBlanket not enabled, ignoring trigger_warmup"
    return false
  end

  orchestrator_factory.new.call
end