lib/jets/internal/app/jobs/jets/preheat_job.rb in jets-0.7.1 vs lib/jets/internal/app/jobs/jets/preheat_job.rb in jets-0.8.0
- old
+ new
@@ -21,11 +21,11 @@
resource: "arn:aws:lambda:#{Jets.aws.region}:#{Jets.aws.account}:function:#{Jets.config.project_namespace}-*",
}
)
unless Jets::Commands::Build.poly_only?
- torching ? rate(PREWARM_RATE) : disable(true)
+ rate(PREWARM_RATE) if torching
def torch
threads = []
CONCURRENCY.times do
threads << Thread.new do
# intentionally calling remote lambda for concurrency
@@ -40,10 +40,10 @@
end
threads.each { |t| t.join }
"Finished prewarming your application with a concurrency of #{CONCURRENCY}."
end
- warming ? rate(PREWARM_RATE) : disable(true)
+ rate(PREWARM_RATE) if warming
def warm
options = call_options(event[:quiet])
Jets::Preheat.warm_all(options)
"Finished prewarming your application."
end