Class: Jets::Prewarm
- Inherits:
-
Object
- Object
- Jets::Prewarm
- Extended by:
- Util::Logging
- Defined in:
- lib/jets/prewarm.rb
Class Method Summary collapse
-
.handle(options = {}) ⇒ Object
Can use to prewarm post deploy Jets::Prewarm.handle Jets::Prewarm.handle(verbose: true, invocation_type: “RequestResponse”) Note: verbose is only useful when invocation_type is “RequestResponse”.
Methods included from Util::Logging
Class Method Details
.handle(options = {}) ⇒ Object
Can use to prewarm post deploy Jets::Prewarm.handle Jets::Prewarm.handle(verbose: true, invocation_type: “RequestResponse”) Note: verbose is only useful when invocation_type is “RequestResponse”
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/jets/prewarm.rb', line 10 def handle( = {}) defaults = { function_name: "controller", event: '{"_prewarm": 1}' } = defaults.merge(.symbolize_keys) # Always calls Lambda, not local # Use invoke so messages don't get printed Jets::CLI::Call.new().invoke rescue Jets::CLI::Call::Error => e puts "ERROR: #{e.}".color(:red) puts "The stack may not be full deployed yet. Please check the stack and try again." end |