module WarmBlanket

WarmBlanket: Ruby gem for warming up web services on boot Copyright (C) 2017 Talkdesk, Inc. <tech@talkdesk.com>

This file is part of WarmBlanket.

WarmBlanket is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

WarmBlanket is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with WarmBlanket. If not, see <www.gnu.org/licenses/>.

Constants

VERSION

Public Class Methods

trigger_warmup(logger: WarmBlanket.config.logger, orchestrator_factory: Orchestrator) click to toggle source
# File lib/warm-blanket.rb, line 45
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