cpee-instantiation 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cpee-instantiation.gemspec +1 -1
- data/lib/cpee-instantiation/instantiation.rb +31 -14
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f53d408e5dbfd7e322a845330ae10df4b8352798576d8bc244b6db6de0a3933
|
4
|
+
data.tar.gz: 8cbae1d0f118f5f7a53a5b6df2dc95946daaf30fa30c964d74ea5fcda0f6dbc8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ce67354922c16a1da5fa2077129081d043f8bb44fc308b2c991f5d6258a5e5eb8a834d68cbc7225db43445114e5447d2234ff90c027029244fa2070a691612d
|
7
|
+
data.tar.gz: 0516e8ba967d5896c925c8d82e2e651b0fa523bbddee621aba94ed995cbc6f7d002ec3d7e42852d4a81d0f5e69fbf43c8c2cbdb1b55d5feac89ad280f06d1a1b
|
data/cpee-instantiation.gemspec
CHANGED
@@ -96,7 +96,6 @@ module CPEE
|
|
96
96
|
def handle_waiting(cpee,instance,uuid,behavior,selfurl,cblist) #{{{
|
97
97
|
if behavior =~ /^wait/
|
98
98
|
condition = behavior.match(/_([^_]+)_/)&.[](1) || 'finished'
|
99
|
-
@headers << Riddl::Header.new('CPEE-CALLBACK','true')
|
100
99
|
cb = @h['CPEE_CALLBACK']
|
101
100
|
|
102
101
|
if cb
|
@@ -172,12 +171,14 @@ module CPEE
|
|
172
171
|
if (instance, uuid = load_testset(tdoc,cpee,nil,stream)).first == -1
|
173
172
|
@status = 500
|
174
173
|
else
|
175
|
-
|
176
|
-
|
177
|
-
|
174
|
+
EM.defer do
|
175
|
+
handle_data cpee, instance, @p[4]&.value if @p[4]&.name == 'init'
|
176
|
+
handle_endpoints cpee, instance, @p[4]&.value if @p[4]&.name == 'endpoints'
|
177
|
+
handle_endpoints cpee, instance, @p[5]&.value if @p[5]&.name == 'endpoints'
|
178
178
|
|
179
|
-
|
180
|
-
|
179
|
+
handle_waiting cpee, instance, uuid, @p[0].value, selfurl, cblist
|
180
|
+
handle_starting cpee, instance, @p[0].value
|
181
|
+
end
|
181
182
|
|
182
183
|
send = {
|
183
184
|
'CPEE-INSTANCE' => instance,
|
@@ -185,6 +186,9 @@ module CPEE
|
|
185
186
|
'CPEE-INSTANCE-UUID' => uuid,
|
186
187
|
'CPEE-BEHAVIOR' => @p[0].value
|
187
188
|
}
|
189
|
+
if @p[0].value =~ /^wait/
|
190
|
+
@headers << Riddl::Header.new('CPEE-CALLBACK','true')
|
191
|
+
end
|
188
192
|
@headers << Riddl::Header.new('CPEE-INSTANTIATION',JSON::generate(send))
|
189
193
|
Riddl::Parameter::Complex.new('instance','application/json',JSON::generate(send))
|
190
194
|
end
|
@@ -210,12 +214,14 @@ module CPEE
|
|
210
214
|
if (instance, uuid = load_testset(tdoc,cpee,name,stream)).first == -1
|
211
215
|
@status = 500
|
212
216
|
else
|
213
|
-
|
214
|
-
|
215
|
-
|
217
|
+
EM.defer do
|
218
|
+
handle_data cpee, instance, @p[2]&.value if @p[2]&.name == 'init'
|
219
|
+
handle_endpoints cpee, instance, @p[2]&.value if @p[2]&.name == 'endpoints'
|
220
|
+
handle_endpoints cpee, instance, @p[3]&.value if @p[3]&.name == 'endpoints'
|
216
221
|
|
217
|
-
|
218
|
-
|
222
|
+
handle_waiting cpee, instance, uuid, @p[0].value, selfurl, cblist
|
223
|
+
handle_starting cpee, instance, @p[0].value
|
224
|
+
end
|
219
225
|
|
220
226
|
send = {
|
221
227
|
'CPEE-INSTANCE' => instance,
|
@@ -223,6 +229,9 @@ module CPEE
|
|
223
229
|
'CPEE-INSTANCE-UUID' => uuid,
|
224
230
|
'CPEE-BEHAVIOR' => @p[0].value
|
225
231
|
}
|
232
|
+
if @p[0].value =~ /^wait/
|
233
|
+
@headers << Riddl::Header.new('CPEE-CALLBACK','true')
|
234
|
+
end
|
226
235
|
@headers << Riddl::Header.new('CPEE-INSTANTIATION',JSON::generate(send))
|
227
236
|
Riddl::Parameter::Complex.new('instance','application/json',JSON::generate(send))
|
228
237
|
end
|
@@ -247,9 +256,11 @@ module CPEE
|
|
247
256
|
if (instance, uuid = load_testset(tdoc,cpee)).first == -1
|
248
257
|
@status = 500
|
249
258
|
else
|
250
|
-
|
251
|
-
|
252
|
-
|
259
|
+
EM.defer do
|
260
|
+
handle_data cpee, instance, @p[data+1]&.value
|
261
|
+
handle_waiting cpee, instance, uuid, behavior, selfurl, cblist
|
262
|
+
handle_starting cpee, instance, behavior
|
263
|
+
end
|
253
264
|
|
254
265
|
send = {
|
255
266
|
'CPEE-INSTANCE' => instance,
|
@@ -257,6 +268,9 @@ module CPEE
|
|
257
268
|
'CPEE-INSTANCE-UUID' => uuid,
|
258
269
|
'CPEE-BEHAVIOR' => behavior
|
259
270
|
}
|
271
|
+
if @p[0].value =~ /^wait/
|
272
|
+
@headers << Riddl::Header.new('CPEE-CALLBACK','true')
|
273
|
+
end
|
260
274
|
Riddl::Parameter::Complex.new('instance','application/json',JSON::generate(send))
|
261
275
|
end
|
262
276
|
end
|
@@ -280,6 +294,9 @@ module CPEE
|
|
280
294
|
handle_data cpee, instance, @p[2]&.value
|
281
295
|
handle_waiting cpee, instance, uuid, @p[0].value, selfurl, cblist
|
282
296
|
handle_starting cpee, instance, @p[0].value
|
297
|
+
if @p[0].value =~ /^wait/
|
298
|
+
@headers << Riddl::Header.new('CPEE-CALLBACK','true')
|
299
|
+
end
|
283
300
|
return Riddl::Parameter::Simple.new("url",cpee + instance)
|
284
301
|
end
|
285
302
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cpee-instantiation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juergen eTM Mangler
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: tools
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-10-
|
11
|
+
date: 2020-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: riddl
|
@@ -93,7 +93,7 @@ homepage: http://cpee.org/
|
|
93
93
|
licenses:
|
94
94
|
- LGPL-3.0
|
95
95
|
metadata: {}
|
96
|
-
post_install_message:
|
96
|
+
post_install_message:
|
97
97
|
rdoc_options: []
|
98
98
|
require_paths:
|
99
99
|
- lib
|
@@ -108,8 +108,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
|
-
rubygems_version: 3.1.
|
112
|
-
signing_key:
|
111
|
+
rubygems_version: 3.1.4
|
112
|
+
signing_key:
|
113
113
|
specification_version: 4
|
114
114
|
summary: Subprocess instantiation service for the cloud process execution engine (cpee.org)
|
115
115
|
test_files: []
|