jets 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/jets/application.rb +1 -0
- data/lib/jets/preheat.rb +22 -1
- data/lib/jets/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c68122c5a2a85bb9081c2c20f383014bfce1109efe241a0db1762958064ad4a
|
4
|
+
data.tar.gz: 6de016056f47eb36e5156017f3fd218b1a3a57ce3b890617fb7d07997c38b794
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a1386fbe1a7e225f27116dcb23b9e272aeaf84992383b1e08f90d3fc1d2e72c69f487c7f5c223b178362eb772695ac6f6426b1f2d4c4248a9e6dcdc5342ae49
|
7
|
+
data.tar.gz: b316f857d5277fb166e0e45e8674fedf8803e6b280b8212600f24967abcf01b6110ccd9fb330295c057aed95a722100f29f6288dc8756000cfcb844eb61cd210
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,10 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *loosely tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [1.0.3]
|
7
|
+
- Allow control to prewarming of rack endpoint more
|
8
|
+
- add config.prewarm.rack_ratio setting pull request #55 from tongueroo/prewarm-rack-more
|
9
|
+
|
6
10
|
## [1.0.2]
|
7
11
|
- jets import:rails --submodule option. pull request #54 from tongueroo/import
|
8
12
|
- upgrade to jets-gems. pull request #53 from tongueroo/gems
|
data/Gemfile.lock
CHANGED
data/lib/jets/application.rb
CHANGED
data/lib/jets/preheat.rb
CHANGED
@@ -30,14 +30,16 @@ module Jets
|
|
30
30
|
threads = []
|
31
31
|
all_functions.each do |function_name|
|
32
32
|
next if function_name.include?('jets-public_controller') # handled by warm_public_controller_more
|
33
|
+
next if function_name.include?('jets-rack_controller') # handled by warm_rack_controller_more
|
33
34
|
threads << Thread.new do
|
34
35
|
warm(function_name)
|
35
36
|
end
|
36
37
|
end
|
37
38
|
threads.each { |t| t.join }
|
38
39
|
|
39
|
-
# Warm the
|
40
|
+
# Warm the these controllers more since they can be hit more often
|
40
41
|
warm_public_controller_more
|
42
|
+
warm_rack_controller_more
|
41
43
|
|
42
44
|
# return the funciton names so we can see in the Lambda console
|
43
45
|
# the functions being prewarmed
|
@@ -62,6 +64,25 @@ module Jets
|
|
62
64
|
threads.each { |t| t.join }
|
63
65
|
end
|
64
66
|
|
67
|
+
def warm_rack_controller_more
|
68
|
+
return unless Jets.rack?
|
69
|
+
function_name = 'jets-rack_controller-process' # key function name
|
70
|
+
return unless all_functions.include?(function_name)
|
71
|
+
|
72
|
+
rack_ratio = Jets.config.prewarm.rack_ratio
|
73
|
+
return if rack_ratio == 0
|
74
|
+
|
75
|
+
puts "Prewarming the rack controller extra at a ratio of #{rack_ratio}" unless @options[:mute]
|
76
|
+
|
77
|
+
threads = []
|
78
|
+
rack_ratio.times do
|
79
|
+
threads << Thread.new do
|
80
|
+
warm(function_name)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
threads.each { |t| t.join }
|
84
|
+
end
|
85
|
+
|
65
86
|
# Returns:
|
66
87
|
# [
|
67
88
|
# "posts_controller-index",
|
data/lib/jets/version.rb
CHANGED