lib/jets/preheat.rb in jets-4.0.1 vs lib/jets/preheat.rb in jets-4.0.2
- old
+ new
@@ -1,8 +1,9 @@
module Jets
class Preheat
extend Memoist
+ include Jets::AwsServices
# Examples:
#
# Jets::Preheat.warm("posts_controller-index")
# Jets::Preheat.warm("jets-preheat_job-warm")
@@ -99,11 +100,13 @@
resources = physical_resource_ids.inject([]) do |acc, physical_resource_id|
stack_resources = cfn.describe_stack_resources(stack_name: physical_resource_id).stack_resources
stack_resources.each do |stack_resource|
acc << stack_resource if stack_resource.logical_resource_id.ends_with?('LambdaFunction') # only functions
end
- end.flatten.uniq.compact
+ acc
+ end
+ resources.map(&:physical_resource_id) # function names
end
memoize :all_functions
def classes
Jets::Commands::Build.app_files.map do |path|
@@ -115,6 +118,6 @@
# IE: PostsController
class_name.constantize # load app/**/* class definition
end.compact
end
end
-end
\ No newline at end of file
+end