spider-gazelle 3.1.1 → 3.2.0
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 +5 -5
- data/lib/spider-gazelle/spider.rb +24 -15
- data/lib/spider-gazelle/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 380532205550af21f6b8b16a78fe41cbaa65741c393ec71507308001a92c8573
|
4
|
+
data.tar.gz: 708b2cb9805e71c81ac0f67e9f50f893dd58577d6101f902f9baa884536dbb50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: baaedc7d50888f4112d036efab973d09bd0a9096a4685f758174d26079e7ef4ee0e0cc479fc6281af12745bac007473ad92f4ad98784966499fff17368a9e50c
|
7
|
+
data.tar.gz: a1ffabf0153e56ec6bfe4e90defa7e410a677e87b60b1a1bb618ae96dffa7f9dd26bba6874407df5a15b99eea180b3536148ebe9e6d2a710762fef9db4a93412
|
@@ -47,6 +47,7 @@ module SpiderGazelle
|
|
47
47
|
@running = true
|
48
48
|
@loaded = false
|
49
49
|
@bound = false
|
50
|
+
@delay_port_binding = false
|
50
51
|
|
51
52
|
@load_complete = @thread.defer
|
52
53
|
end
|
@@ -71,7 +72,8 @@ module SpiderGazelle
|
|
71
72
|
|
72
73
|
# This happends on the master thread so we don't need to check
|
73
74
|
# for the shutdown events here
|
74
|
-
|
75
|
+
@loaded = true
|
76
|
+
bind_application_ports unless @delay_port_binding
|
75
77
|
else
|
76
78
|
@logger.warn "A shutdown event occured while loading"
|
77
79
|
perform_shutdown
|
@@ -84,7 +86,7 @@ module SpiderGazelle
|
|
84
86
|
|
85
87
|
# Load gazelles and wait for the bindings to be sent
|
86
88
|
def wait
|
87
|
-
|
89
|
+
|
88
90
|
end
|
89
91
|
|
90
92
|
# Pass existing bindings to the master process
|
@@ -110,6 +112,26 @@ module SpiderGazelle
|
|
110
112
|
end
|
111
113
|
end
|
112
114
|
|
115
|
+
def bind_application_ports
|
116
|
+
if @delay_port_binding && !@loaded
|
117
|
+
loaded.finally { bind_application_ports }
|
118
|
+
return
|
119
|
+
end
|
120
|
+
@bound = true
|
121
|
+
|
122
|
+
@options.each do |options|
|
123
|
+
@logger.verbose { "Loading rackup #{options}" }
|
124
|
+
iterator = @iterators[options[:mode]]
|
125
|
+
|
126
|
+
binding = @bindings[options[:port]] = Binding.new(iterator, options)
|
127
|
+
binding.bind
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
def delay_port_binding
|
132
|
+
@delay_port_binding = true
|
133
|
+
end
|
134
|
+
|
113
135
|
|
114
136
|
protected
|
115
137
|
|
@@ -201,19 +223,6 @@ module SpiderGazelle
|
|
201
223
|
end
|
202
224
|
end
|
203
225
|
|
204
|
-
def bind_application_ports
|
205
|
-
@bound = true
|
206
|
-
@loaded = true
|
207
|
-
|
208
|
-
@options.each do |options|
|
209
|
-
@logger.verbose { "Loading rackup #{options}" }
|
210
|
-
iterator = @iterators[options[:mode]]
|
211
|
-
|
212
|
-
binding = @bindings[options[:port]] = Binding.new(iterator, options)
|
213
|
-
binding.bind
|
214
|
-
end
|
215
|
-
end
|
216
|
-
|
217
226
|
|
218
227
|
# -------------------
|
219
228
|
# Shutdown Management
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spider-gazelle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen von Takach
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http-parser
|
@@ -195,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
195
195
|
version: '0'
|
196
196
|
requirements: []
|
197
197
|
rubyforge_project:
|
198
|
-
rubygems_version: 2.
|
198
|
+
rubygems_version: 2.7.7
|
199
199
|
signing_key:
|
200
200
|
specification_version: 4
|
201
201
|
summary: A fast, parallel and concurrent web server for ruby
|