cpee 2.1.30 → 2.1.34
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cockpit/templates/Frames.xml +297 -0
- data/cockpit/templates/Subprocess.xml +5 -4
- data/cockpit/templates/Worklist.xml +12 -9
- data/cpee.gemspec +3 -2
- data/lib/cpee/implementation.rb +52 -0
- data/lib/cpee/implementation_properties.rb +1 -1
- data/lib/cpee/message.rb +20 -0
- data/server/executionhandlers/ruby/connection.rb +16 -2
- data/server/executionhandlers/ruby/controller.rb +6 -3
- data/server/executionhandlers/ruby/dsl_to_dslx.xsl +3 -3
- data/server/resources/topics.xml +1 -0
- data/tools/cpee +3 -1
- metadata +31 -20
- data/server/routing/end.pid +0 -1
- data/server/routing/forward-events.pid +0 -1
- data/server/routing/forward-votes.pid +0 -1
- data/server/routing/persist.pid +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8457b0e49c82e8b44919cd7357de2ecc51067f9df04c81b17ec7b6fea57f9b3a
|
4
|
+
data.tar.gz: e391eee4876c1c6e653f0db52072c2f8e93434a8513e6200503549bab804ffbf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e19e6b803139d751fc5d58f4c7d2e79f8ca4efc6a5c5c7b79db23a20586a07f755fe0340f537f85af5eda52a0c1de1ee0a787b21cd57206fe5f3d6dd3ec62fb
|
7
|
+
data.tar.gz: 48811e367128497ee1896adda017ebf524a14d08b5c3038222580f22ea37805a5c63bdf3d5dc9dbfd85c06d4e42d4132ecba3308cdd5a008b8497792fdd80690
|
@@ -0,0 +1,297 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<testset xmlns="http://cpee.org/ns/properties/2.0">
|
3
|
+
<executionhandler>ruby</executionhandler>
|
4
|
+
<dataelements/>
|
5
|
+
<endpoints>
|
6
|
+
<timeout>https://cpee.org/services/timeout.php</timeout>
|
7
|
+
<subprocess>https://cpee.org/flow/start/url/</subprocess>
|
8
|
+
<frames_init>https-post://cpee.org/out/frames/simple/</frames_init>
|
9
|
+
<send>https-post://cpee.org/ing/correlators/message/send/</send>
|
10
|
+
<frames_display>https-put://cpee.org/out/frames/simple/</frames_display>
|
11
|
+
<receive>https-get://cpee.org/ing/correlators/message/receive/</receive>
|
12
|
+
<user>https-post://cpee.org/services/timeout-user.php</user>
|
13
|
+
<auto>https-post://cpee.org/services/timeout-auto.php</auto>
|
14
|
+
</endpoints>
|
15
|
+
<attributes>
|
16
|
+
<info>Frames</info>
|
17
|
+
<creator>Christine Ashcreek</creator>
|
18
|
+
<author>Christine Ashcreek</author>
|
19
|
+
<modeltype>CPEE</modeltype>
|
20
|
+
<guarded>none</guarded>
|
21
|
+
<guarded_id/>
|
22
|
+
<model_uuid>5ed82f61-a382-49b5-a420-c63e01d5a9f5</model_uuid>
|
23
|
+
<model_version/>
|
24
|
+
<theme>extended</theme>
|
25
|
+
<design_dir>Templates.dir</design_dir>
|
26
|
+
<design_stage>development</design_stage>
|
27
|
+
</attributes>
|
28
|
+
<description>
|
29
|
+
<description xmlns="http://cpee.org/ns/description/1.0">
|
30
|
+
<call id="a1" endpoint="frames_init">
|
31
|
+
<parameters>
|
32
|
+
<label>"Init Frame"</label>
|
33
|
+
<arguments>
|
34
|
+
<style_url>https://cpee.org/form/frames.css</style_url>
|
35
|
+
<document_url/>
|
36
|
+
<x_amount>5</x_amount>
|
37
|
+
<y_amount>8</y_amount>
|
38
|
+
<lang>de-at</lang>
|
39
|
+
<document_name>Show Info</document_name>
|
40
|
+
</arguments>
|
41
|
+
</parameters>
|
42
|
+
<annotations>
|
43
|
+
<_timing>
|
44
|
+
<_timing_weight/>
|
45
|
+
<_timing_avg/>
|
46
|
+
<_context_data_analysis>
|
47
|
+
<probes/>
|
48
|
+
<ips/>
|
49
|
+
</_context_data_analysis>
|
50
|
+
<report>
|
51
|
+
<url/>
|
52
|
+
</report>
|
53
|
+
<explanations/>
|
54
|
+
</_timing>
|
55
|
+
<_notes>
|
56
|
+
<_notes_general/>
|
57
|
+
</_notes>
|
58
|
+
</annotations>
|
59
|
+
<documentation>
|
60
|
+
<input/>
|
61
|
+
<output/>
|
62
|
+
<implementation>
|
63
|
+
<description/>
|
64
|
+
</implementation>
|
65
|
+
</documentation>
|
66
|
+
</call>
|
67
|
+
<call id="a3" endpoint="frames_display">
|
68
|
+
<parameters>
|
69
|
+
<label>Clear </label>
|
70
|
+
<arguments>
|
71
|
+
<type>set</type>
|
72
|
+
<lx>0</lx>
|
73
|
+
<ly>0</ly>
|
74
|
+
<x_amount>5</x_amount>
|
75
|
+
<y_amount>8</y_amount>
|
76
|
+
<button/>
|
77
|
+
<style/>
|
78
|
+
<urls/>
|
79
|
+
<default/>
|
80
|
+
</arguments>
|
81
|
+
</parameters>
|
82
|
+
<annotations>
|
83
|
+
<_timing>
|
84
|
+
<_timing_weight/>
|
85
|
+
<_timing_avg/>
|
86
|
+
<_context_data_analysis>
|
87
|
+
<probes/>
|
88
|
+
<ips/>
|
89
|
+
</_context_data_analysis>
|
90
|
+
<report>
|
91
|
+
<url/>
|
92
|
+
</report>
|
93
|
+
<explanations/>
|
94
|
+
</_timing>
|
95
|
+
<_notes>
|
96
|
+
<_notes_general/>
|
97
|
+
</_notes>
|
98
|
+
</annotations>
|
99
|
+
<documentation>
|
100
|
+
<input/>
|
101
|
+
<output/>
|
102
|
+
<implementation>
|
103
|
+
<description/>
|
104
|
+
</implementation>
|
105
|
+
</documentation>
|
106
|
+
</call>
|
107
|
+
<call id="a6" endpoint="frames_display">
|
108
|
+
<parameters>
|
109
|
+
<label>Show Header</label>
|
110
|
+
<arguments>
|
111
|
+
<type>set</type>
|
112
|
+
<lx>0</lx>
|
113
|
+
<ly>0</ly>
|
114
|
+
<x_amount>5</x_amount>
|
115
|
+
<y_amount>1</y_amount>
|
116
|
+
<button/>
|
117
|
+
<style/>
|
118
|
+
<urls>
|
119
|
+
<urls_item>
|
120
|
+
<lang>de-at</lang>
|
121
|
+
<url>https://cpee.org/form/tum-header.html</url>
|
122
|
+
</urls_item>
|
123
|
+
</urls>
|
124
|
+
<default/>
|
125
|
+
</arguments>
|
126
|
+
</parameters>
|
127
|
+
<annotations>
|
128
|
+
<_timing>
|
129
|
+
<_timing_weight/>
|
130
|
+
<_timing_avg/>
|
131
|
+
<_context_data_analysis>
|
132
|
+
<probes/>
|
133
|
+
<ips/>
|
134
|
+
</_context_data_analysis>
|
135
|
+
<report>
|
136
|
+
<url/>
|
137
|
+
</report>
|
138
|
+
<explanations/>
|
139
|
+
</_timing>
|
140
|
+
<_notes>
|
141
|
+
<_notes_general/>
|
142
|
+
</_notes>
|
143
|
+
</annotations>
|
144
|
+
<documentation>
|
145
|
+
<input/>
|
146
|
+
<output/>
|
147
|
+
<implementation>
|
148
|
+
<description/>
|
149
|
+
</implementation>
|
150
|
+
</documentation>
|
151
|
+
</call>
|
152
|
+
<call id="a5" endpoint="frames_display">
|
153
|
+
<parameters>
|
154
|
+
<label>Display Graph</label>
|
155
|
+
<arguments>
|
156
|
+
<type>set</type>
|
157
|
+
<lx>3</lx>
|
158
|
+
<ly>1</ly>
|
159
|
+
<x_amount>2</x_amount>
|
160
|
+
<y_amount>7</y_amount>
|
161
|
+
<button/>
|
162
|
+
<style/>
|
163
|
+
<urls>
|
164
|
+
<urls_item>
|
165
|
+
<lang>de-at</lang>
|
166
|
+
<url>!"https://cpee.org/flow/graph.html?monitor=" + cpee.instance_url</url>
|
167
|
+
</urls_item>
|
168
|
+
</urls>
|
169
|
+
<default/>
|
170
|
+
</arguments>
|
171
|
+
</parameters>
|
172
|
+
<annotations>
|
173
|
+
<_timing>
|
174
|
+
<_timing_weight/>
|
175
|
+
<_timing_avg/>
|
176
|
+
<_context_data_analysis>
|
177
|
+
<probes/>
|
178
|
+
<ips/>
|
179
|
+
</_context_data_analysis>
|
180
|
+
<report>
|
181
|
+
<url/>
|
182
|
+
</report>
|
183
|
+
<explanations/>
|
184
|
+
</_timing>
|
185
|
+
<_notes>
|
186
|
+
<_notes_general/>
|
187
|
+
</_notes>
|
188
|
+
</annotations>
|
189
|
+
<documentation>
|
190
|
+
<input/>
|
191
|
+
<output/>
|
192
|
+
<implementation>
|
193
|
+
<description/>
|
194
|
+
</implementation>
|
195
|
+
</documentation>
|
196
|
+
</call>
|
197
|
+
<loop mode="post_test" condition="true">
|
198
|
+
<_probability>
|
199
|
+
<_probability_min/>
|
200
|
+
<_probability_max/>
|
201
|
+
<_probability_avg/>
|
202
|
+
</_probability>
|
203
|
+
<call id="a2" endpoint="frames_display">
|
204
|
+
<parameters>
|
205
|
+
<label>Show Button</label>
|
206
|
+
<arguments>
|
207
|
+
<type>wait</type>
|
208
|
+
<lx>0</lx>
|
209
|
+
<ly>1</ly>
|
210
|
+
<x_amount>1</x_amount>
|
211
|
+
<y_amount>1</y_amount>
|
212
|
+
<button/>
|
213
|
+
<style/>
|
214
|
+
<urls>
|
215
|
+
<urls_item>
|
216
|
+
<lang>de-at</lang>
|
217
|
+
<url>https://cpee.org/form/button.html</url>
|
218
|
+
</urls_item>
|
219
|
+
</urls>
|
220
|
+
<default/>
|
221
|
+
</arguments>
|
222
|
+
</parameters>
|
223
|
+
<annotations>
|
224
|
+
<_timing>
|
225
|
+
<_timing_weight/>
|
226
|
+
<_timing_avg/>
|
227
|
+
<_context_data_analysis>
|
228
|
+
<probes/>
|
229
|
+
<ips/>
|
230
|
+
</_context_data_analysis>
|
231
|
+
<report>
|
232
|
+
<url/>
|
233
|
+
</report>
|
234
|
+
<explanations/>
|
235
|
+
</_timing>
|
236
|
+
<_notes>
|
237
|
+
<_notes_general/>
|
238
|
+
</_notes>
|
239
|
+
</annotations>
|
240
|
+
<documentation>
|
241
|
+
<input/>
|
242
|
+
<output/>
|
243
|
+
<implementation>
|
244
|
+
<description/>
|
245
|
+
</implementation>
|
246
|
+
</documentation>
|
247
|
+
</call>
|
248
|
+
<call id="a7" endpoint="frames_display">
|
249
|
+
<parameters>
|
250
|
+
<label>Clear Button</label>
|
251
|
+
<arguments>
|
252
|
+
<type>set</type>
|
253
|
+
<lx>0</lx>
|
254
|
+
<ly>1</ly>
|
255
|
+
<x_amount>1</x_amount>
|
256
|
+
<y_amount>1</y_amount>
|
257
|
+
<button/>
|
258
|
+
<style/>
|
259
|
+
<urls/>
|
260
|
+
<default/>
|
261
|
+
</arguments>
|
262
|
+
</parameters>
|
263
|
+
<annotations>
|
264
|
+
<_timing>
|
265
|
+
<_timing_weight/>
|
266
|
+
<_timing_avg/>
|
267
|
+
<_context_data_analysis>
|
268
|
+
<probes/>
|
269
|
+
<ips/>
|
270
|
+
</_context_data_analysis>
|
271
|
+
<report>
|
272
|
+
<url/>
|
273
|
+
</report>
|
274
|
+
<explanations/>
|
275
|
+
</_timing>
|
276
|
+
<_notes>
|
277
|
+
<_notes_general/>
|
278
|
+
</_notes>
|
279
|
+
</annotations>
|
280
|
+
<documentation>
|
281
|
+
<input/>
|
282
|
+
<output/>
|
283
|
+
<implementation>
|
284
|
+
<description/>
|
285
|
+
</implementation>
|
286
|
+
</documentation>
|
287
|
+
</call>
|
288
|
+
<stop id="a4"/>
|
289
|
+
</loop>
|
290
|
+
</description>
|
291
|
+
</description>
|
292
|
+
<transformation>
|
293
|
+
<description type="copy"/>
|
294
|
+
<dataelements type="none"/>
|
295
|
+
<endpoints type="none"/>
|
296
|
+
</transformation>
|
297
|
+
</testset>
|
@@ -1,10 +1,12 @@
|
|
1
1
|
<?xml version="1.0"?>
|
2
2
|
<testset xmlns="http://cpee.org/ns/properties/2.0">
|
3
3
|
<executionhandler>ruby</executionhandler>
|
4
|
-
<dataelements
|
4
|
+
<dataelements>
|
5
|
+
<brr>{ "a": 3 }</brr>
|
6
|
+
</dataelements>
|
5
7
|
<endpoints>
|
6
8
|
<timeout>https://cpee.org/services/timeout.php</timeout>
|
7
|
-
<subprocess>https://cpee.org/flow/start/url/</subprocess>
|
9
|
+
<subprocess>https-post://cpee.org/flow/start/url/</subprocess>
|
8
10
|
</endpoints>
|
9
11
|
<attributes>
|
10
12
|
<info>Subprocess</info>
|
@@ -24,12 +26,11 @@
|
|
24
26
|
<call id="a1" endpoint="subprocess">
|
25
27
|
<parameters>
|
26
28
|
<label>Sub</label>
|
27
|
-
<method>:post</method>
|
28
29
|
<arguments>
|
29
30
|
<behavior>wait_running</behavior>
|
30
31
|
<url>https://cpee.org/design/server/Templates.dir/Wait.xml</url>
|
31
32
|
<init>
|
32
|
-
<bla
|
33
|
+
<bla>!data.brr</bla>
|
33
34
|
</init>
|
34
35
|
<endpoints/>
|
35
36
|
<customization/>
|
@@ -1,12 +1,15 @@
|
|
1
1
|
<?xml version="1.0"?>
|
2
2
|
<testset xmlns="http://cpee.org/ns/properties/2.0">
|
3
3
|
<executionhandler>ruby</executionhandler>
|
4
|
-
<dataelements
|
5
|
-
<bla/>
|
6
|
-
</dataelements>
|
4
|
+
<dataelements/>
|
7
5
|
<endpoints>
|
8
6
|
<timeout>http://gruppe.wst.univie.ac.at/~mangler/services/timeout.php</timeout>
|
9
|
-
<
|
7
|
+
<subprocess>https-post://cpee.org/flow/start/url/</subprocess>
|
8
|
+
<worklist>https-post://cpee.org/worklist/server/</worklist>
|
9
|
+
<send>https-post://cpee.org/ing/correlators/message/send/</send>
|
10
|
+
<receive>https-get://cpee.org/ing/correlators/message/receive/</receive>
|
11
|
+
<user>https-post://cpee.org/services/timeout-user.php</user>
|
12
|
+
<auto>https-post://cpee.org/services/timeout-auto.php</auto>
|
10
13
|
</endpoints>
|
11
14
|
<attributes>
|
12
15
|
<info>Worklist</info>
|
@@ -23,14 +26,15 @@
|
|
23
26
|
<call id="a1" endpoint="worklist">
|
24
27
|
<parameters>
|
25
28
|
<label>OK OR NOT OK</label>
|
26
|
-
<method>:post</method>
|
27
29
|
<arguments>
|
28
|
-
<orgmodel>
|
30
|
+
<orgmodel>https://cpee.org/~demo/orgviz/organisation_informatik.xml</orgmodel>
|
29
31
|
<domain>VirtualBusiness1</domain>
|
30
32
|
<form>https://cpee.org/~demo/form/form-f.html</form>
|
31
33
|
<role>Assistant</role>
|
32
|
-
<
|
33
|
-
|
34
|
+
<data>
|
35
|
+
<schaden>10000</schaden>
|
36
|
+
<text>destroyed</text>
|
37
|
+
</data>
|
34
38
|
</arguments>
|
35
39
|
</parameters>
|
36
40
|
<code>
|
@@ -67,7 +71,6 @@
|
|
67
71
|
</code>
|
68
72
|
</documentation>
|
69
73
|
</call>
|
70
|
-
<stop id="a2"/>
|
71
74
|
</description>
|
72
75
|
</description>
|
73
76
|
<transformation>
|
data/cpee.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "cpee"
|
3
|
-
s.version = "2.1.
|
3
|
+
s.version = "2.1.34"
|
4
4
|
s.platform = Gem::Platform::RUBY
|
5
5
|
s.license = "LGPL-3.0"
|
6
6
|
s.summary = "Preliminary release of cloud process execution engine (cpee.org). If you just need workflow execution, without a rest service exposing it, then use WEEL."
|
@@ -24,9 +24,10 @@ Gem::Specification.new do |s|
|
|
24
24
|
s.add_runtime_dependency 'riddl', '~> 0.114'
|
25
25
|
s.add_runtime_dependency 'weel', '~> 1.99', '>= 1.99.99'
|
26
26
|
s.add_runtime_dependency 'highline', '~> 2.0'
|
27
|
-
s.add_runtime_dependency 'json', '~>2.1'
|
28
27
|
s.add_runtime_dependency 'redis', '~> 4.1'
|
29
28
|
s.add_runtime_dependency 'rubyzip', '~>2'
|
30
29
|
s.add_runtime_dependency 'charlock_holmes', '~>0'
|
31
30
|
s.add_runtime_dependency 'mimemagic', '~>0'
|
31
|
+
s.add_runtime_dependency 'get_process_mem', '~>0.2'
|
32
|
+
s.add_runtime_dependency 'webrick', '~>1.7'
|
32
33
|
end
|
data/lib/cpee/implementation.rb
CHANGED
@@ -68,6 +68,9 @@ module CPEE
|
|
68
68
|
opts[:watchdog_start_off] ||= false
|
69
69
|
opts[:infinite_loop_stop] ||= 10000
|
70
70
|
|
71
|
+
opts[:dashing_frequency] ||= 3
|
72
|
+
opts[:dashing_target] ||= nil
|
73
|
+
|
71
74
|
### set redis_cmd to nil if you want to do global
|
72
75
|
### at least redis_path or redis_url and redis_db have to be set if you do global
|
73
76
|
opts[:redis_path] ||= 'redis.sock' # use e.g. /tmp/redis.sock for global stuff. Look it up in your redis config
|
@@ -114,6 +117,55 @@ module CPEE
|
|
114
117
|
EM.add_periodic_timer(opts[:sse_keepalive_frequency]) do
|
115
118
|
CPEE::Notifications::sse_heartbeat(opts)
|
116
119
|
end
|
120
|
+
|
121
|
+
if opts[:dashing_target]
|
122
|
+
cpu_last = 0
|
123
|
+
idl_last = 0
|
124
|
+
EM.add_periodic_timer(opts[:dashing_frequency]) do
|
125
|
+
src = `cat /proc/stat | head -n 1`.split("\n")
|
126
|
+
srm = `cat /proc/meminfo`.split("\n")
|
127
|
+
sc = {}
|
128
|
+
sm = {}
|
129
|
+
src.each do |e|
|
130
|
+
x = e.split(' ')
|
131
|
+
sc[x[0]] = x[1..-1].map{|r| r.to_i}
|
132
|
+
end
|
133
|
+
srm.each do |e|
|
134
|
+
x = e.split(/\s+/)
|
135
|
+
sm[x[0].chop] = x[1].to_i
|
136
|
+
end
|
137
|
+
scc = 0
|
138
|
+
sci = 0
|
139
|
+
sc.each do |_,e|
|
140
|
+
scc = e[0..4].sum
|
141
|
+
sci = e[3]
|
142
|
+
end
|
143
|
+
cpu_delta = scc - cpu_last
|
144
|
+
cpu_idle = sci - idl_last
|
145
|
+
cpu_used = cpu_delta - cpu_idle
|
146
|
+
cpu_usage = '%.2f' % (100 * cpu_used / cpu_delta.to_f)
|
147
|
+
mem_tot = '%.1f' % (sm['MemTotal']/1024.0)
|
148
|
+
mem_fre = '%.1f' % (sm['MemFree']/1024.0)
|
149
|
+
mem_ava = '%.1f' % (sm['MemAvailable']/1024.0)
|
150
|
+
mem_buc = '%.1f' % ((sm['Buffers'] + sm['Cached'] + sm['SReclaimable'])/1024.0)
|
151
|
+
mem_usd = '%.1f' % ((sm['MemTotal'] - sm['MemFree'] - sm['Buffers'] - sm['Cached'] - sm['SReclaimable'])/1024.0)
|
152
|
+
|
153
|
+
# puts "CPU usage at #{cpu_usage}%"
|
154
|
+
# puts "Mem usage at #{mem_tot}/#{mem_fre}/#{mem_usd}/#{mem_buc}/#{mem_ava}"
|
155
|
+
content = {}
|
156
|
+
content['cpu_usage'] = cpu_usage
|
157
|
+
content['mem_total'] = mem_tot
|
158
|
+
content['mem_free'] = mem_fre
|
159
|
+
content['mem_available'] = mem_ava
|
160
|
+
content['mem_bufferedandcached'] = mem_buc
|
161
|
+
content['mem_used'] = mem_usd
|
162
|
+
CPEE::Message::send_url(:event,'node/resource_utilization',File.join(opts[:url],'/'),content,File.join(opts[:dashing_target],'/dash/events'))
|
163
|
+
|
164
|
+
# Keep this as last for our next read
|
165
|
+
idl_last = sci
|
166
|
+
cpu_last = scc
|
167
|
+
end
|
168
|
+
end
|
117
169
|
end
|
118
170
|
|
119
171
|
cleanup do
|
@@ -227,7 +227,7 @@ module CPEE
|
|
227
227
|
end #}}}
|
228
228
|
class PutState < Riddl::Implementation #{{{
|
229
229
|
def self::set(id,opts,state)
|
230
|
-
CPEE::Persistence::set_item(id,opts,'state',:state => state, :
|
230
|
+
CPEE::Persistence::set_item(id,opts,'state',:state => state, :attributes => CPEE::Persistence::extract_list(id,opts,'attributes').to_h)
|
231
231
|
end
|
232
232
|
|
233
233
|
def self::run(id,opts,state)
|
data/lib/cpee/message.rb
CHANGED
@@ -39,6 +39,26 @@ module CPEE
|
|
39
39
|
)
|
40
40
|
end
|
41
41
|
|
42
|
+
def self::send_url(type, event, cpee, content={}, backend)
|
43
|
+
topic = ::File::dirname(event)
|
44
|
+
name = ::File::basename(event)
|
45
|
+
client = Riddl::Client.new(backend)
|
46
|
+
payload = {
|
47
|
+
WHO => cpee,
|
48
|
+
'topic' => topic,
|
49
|
+
'type' => type,
|
50
|
+
'name' => name,
|
51
|
+
'timestamp' => Time.now.xmlschema(3),
|
52
|
+
'content' => content
|
53
|
+
}
|
54
|
+
client = Riddl::Client.new(backend)
|
55
|
+
client.post [
|
56
|
+
Riddl::Parameter::Simple::new('type',type),
|
57
|
+
Riddl::Parameter::Simple::new('topic',topic),
|
58
|
+
Riddl::Parameter::Simple::new('event',name),
|
59
|
+
Riddl::Parameter::Complex::new('notification','application/json',JSON::generate(payload))
|
60
|
+
]
|
61
|
+
end
|
42
62
|
end
|
43
63
|
|
44
64
|
end
|
@@ -15,6 +15,7 @@
|
|
15
15
|
require 'charlock_holmes'
|
16
16
|
require 'mimemagic'
|
17
17
|
require 'base64'
|
18
|
+
require 'get_process_mem'
|
18
19
|
|
19
20
|
class ConnectionWrapper < WEEL::ConnectionWrapperBase
|
20
21
|
def self::loop_guard(arguments,id,count) # {{{
|
@@ -77,7 +78,15 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
|
|
77
78
|
end #}}}
|
78
79
|
|
79
80
|
def additional #{{{
|
80
|
-
{
|
81
|
+
{
|
82
|
+
:attributes => @controller.attributes,
|
83
|
+
:cpee => {
|
84
|
+
'base' => @controller.base_url,
|
85
|
+
'instance' => @controller.instance_id,
|
86
|
+
'instance_url' => @controller.instance_url,
|
87
|
+
'instance_uuid' => @controller.uuid
|
88
|
+
}
|
89
|
+
}
|
81
90
|
end #}}}
|
82
91
|
|
83
92
|
def proto_curl(parameters) #{{{
|
@@ -184,6 +193,7 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
|
|
184
193
|
|
185
194
|
def inform_activity_done # {{{
|
186
195
|
@controller.notify("activity/done", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position)
|
196
|
+
@controller.notify("status/resource_utilization", :mib => GetProcessMem.new.mb, **Process.times.to_h)
|
187
197
|
end # }}}
|
188
198
|
def inform_activity_manipulate # {{{
|
189
199
|
@controller.notify("activity/manipulating", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position)
|
@@ -303,10 +313,14 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
|
|
303
313
|
end
|
304
314
|
|
305
315
|
def callback(result=nil,options={})
|
306
|
-
|
316
|
+
recv = structurize_result(result)
|
317
|
+
@controller.notify("activity/receiving", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :received => recv, :annotations => @anno)
|
307
318
|
@guard_files += result
|
308
319
|
@handler_returnValue = simplify_result(result)
|
309
320
|
@handler_returnOptions = options
|
321
|
+
if options['CPEE_EVENT']
|
322
|
+
@controller.notify("task/#{headers['CPEE_EVENT'].gsub(/[^\w_-]/,'')}", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :received => recv)
|
323
|
+
end
|
310
324
|
if options['CPEE_UPDATE']
|
311
325
|
if options['CPEE_UPDATE_STATUS']
|
312
326
|
@controller.notify("activity/status", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :status => options['CPEE_UPDATE_STATUS'])
|
@@ -53,9 +53,9 @@ class Controller
|
|
53
53
|
@loop_guard = {}
|
54
54
|
|
55
55
|
@callback_keys = {}
|
56
|
-
@psredis = @opts[:redis_dyn].call "Instance #{@id} Callback Response"
|
57
56
|
|
58
|
-
Thread.new do
|
57
|
+
@subs = Thread.new do
|
58
|
+
@psredis = @opts[:redis_dyn].call "Instance #{@id} Callback Response"
|
59
59
|
@psredis.psubscribe('callback-response:*','callback-end:*') do |on|
|
60
60
|
on.pmessage do |pat, what, message|
|
61
61
|
if pat == 'callback-response:*' && @callback_keys.has_key?(what[18..-1])
|
@@ -78,6 +78,10 @@ class Controller
|
|
78
78
|
end
|
79
79
|
end
|
80
80
|
end
|
81
|
+
@psredis.close
|
82
|
+
rescue => e
|
83
|
+
sleep 1
|
84
|
+
retry
|
81
85
|
end
|
82
86
|
end
|
83
87
|
|
@@ -137,7 +141,6 @@ class Controller
|
|
137
141
|
CPEE::Message::send(:'vote-response',key,base,@id,uuid,info,true,@redis)
|
138
142
|
end
|
139
143
|
end
|
140
|
-
@thread.join if !@thread.nil? && @thread.alive?
|
141
144
|
end
|
142
145
|
|
143
146
|
def info
|
@@ -749,9 +749,9 @@
|
|
749
749
|
<xsl:otherwise>
|
750
750
|
<xsl:choose>
|
751
751
|
<xsl:when test="substring(.,1,1) = '!'">
|
752
|
-
<xsl:text>#{</xsl:text>
|
753
|
-
<xsl:value-of select="
|
754
|
-
<xsl:text
|
752
|
+
<xsl:text>#{(</xsl:text>
|
753
|
+
<xsl:value-of select="substring(.,2)"/>
|
754
|
+
<xsl:text>).to_json}</xsl:text>
|
755
755
|
</xsl:when>
|
756
756
|
<xsl:otherwise>
|
757
757
|
<xsl:text>\"</xsl:text>
|
data/server/resources/topics.xml
CHANGED
data/tools/cpee
CHANGED
@@ -235,7 +235,9 @@ elsif command == 'abandon'
|
|
235
235
|
print "Working on: " + name.to_s + "\r"
|
236
236
|
res1 = Typhoeus.get(File.join(base,name.to_s,'properties','state','/'))
|
237
237
|
if res1.success?
|
238
|
-
if res1.response_body == '
|
238
|
+
if res1.response_body == 'running'
|
239
|
+
Typhoeus.put(File.join(base,name.to_s,'properties','state','/'), headers: {'Content-Type' => 'application/x-www-form-urlencoded'}, body: "value=stopping")
|
240
|
+
elsif res1.response_body == 'ready' || res1.response_body == 'stopped'
|
239
241
|
Typhoeus.put(File.join(base,name.to_s,'properties','state','/'), headers: {'Content-Type' => 'application/x-www-form-urlencoded'}, body: "value=abandoned")
|
240
242
|
end
|
241
243
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cpee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.34
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juergen eTM Mangler
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: tools
|
12
12
|
cert_chain: []
|
13
|
-
date: 2022-
|
13
|
+
date: 2022-05-03 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: riddl
|
@@ -61,49 +61,49 @@ dependencies:
|
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '2.0'
|
63
63
|
- !ruby/object:Gem::Dependency
|
64
|
-
name:
|
64
|
+
name: redis
|
65
65
|
requirement: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: '
|
69
|
+
version: '4.1'
|
70
70
|
type: :runtime
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
74
|
- - "~>"
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: '
|
76
|
+
version: '4.1'
|
77
77
|
- !ruby/object:Gem::Dependency
|
78
|
-
name:
|
78
|
+
name: rubyzip
|
79
79
|
requirement: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
81
|
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: '
|
83
|
+
version: '2'
|
84
84
|
type: :runtime
|
85
85
|
prerelease: false
|
86
86
|
version_requirements: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
88
|
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version: '
|
90
|
+
version: '2'
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
|
-
name:
|
92
|
+
name: charlock_holmes
|
93
93
|
requirement: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
95
|
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version: '
|
97
|
+
version: '0'
|
98
98
|
type: :runtime
|
99
99
|
prerelease: false
|
100
100
|
version_requirements: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
102
|
- - "~>"
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
version: '
|
104
|
+
version: '0'
|
105
105
|
- !ruby/object:Gem::Dependency
|
106
|
-
name:
|
106
|
+
name: mimemagic
|
107
107
|
requirement: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
109
|
- - "~>"
|
@@ -117,19 +117,33 @@ dependencies:
|
|
117
117
|
- !ruby/object:Gem::Version
|
118
118
|
version: '0'
|
119
119
|
- !ruby/object:Gem::Dependency
|
120
|
-
name:
|
120
|
+
name: get_process_mem
|
121
121
|
requirement: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
123
|
- - "~>"
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: '0'
|
125
|
+
version: '0.2'
|
126
126
|
type: :runtime
|
127
127
|
prerelease: false
|
128
128
|
version_requirements: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
130
|
- - "~>"
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version: '0'
|
132
|
+
version: '0.2'
|
133
|
+
- !ruby/object:Gem::Dependency
|
134
|
+
name: webrick
|
135
|
+
requirement: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - "~>"
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '1.7'
|
140
|
+
type: :runtime
|
141
|
+
prerelease: false
|
142
|
+
version_requirements: !ruby/object:Gem::Requirement
|
143
|
+
requirements:
|
144
|
+
- - "~>"
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: '1.7'
|
133
147
|
description: see http://cpee.org
|
134
148
|
email: juergen.mangler@gmail.com
|
135
149
|
executables:
|
@@ -221,6 +235,7 @@ files:
|
|
221
235
|
- cockpit/templates.legacy/testsets.xml
|
222
236
|
- cockpit/templates.legacy/transformations.xml
|
223
237
|
- cockpit/templates/Coopis 2010.xml
|
238
|
+
- cockpit/templates/Frames.xml
|
224
239
|
- cockpit/templates/IUPC arXiv:1104.3609 P34 1.xml
|
225
240
|
- cockpit/templates/IUPC arXiv:1104.3609 P34 2.xml
|
226
241
|
- cockpit/templates/IUPC arXiv:1104.3609 P34 3.xml
|
@@ -663,13 +678,9 @@ files:
|
|
663
678
|
- server/resources/states.xml
|
664
679
|
- server/resources/topics.xml
|
665
680
|
- server/resources/transformation.xml
|
666
|
-
- server/routing/end.pid
|
667
681
|
- server/routing/end.rb
|
668
|
-
- server/routing/forward-events.pid
|
669
682
|
- server/routing/forward-events.rb
|
670
|
-
- server/routing/forward-votes.pid
|
671
683
|
- server/routing/forward-votes.rb
|
672
|
-
- server/routing/persist.pid
|
673
684
|
- server/routing/persist.rb
|
674
685
|
- server/server.conf
|
675
686
|
- server/server.rb
|
@@ -696,7 +707,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
696
707
|
- !ruby/object:Gem::Version
|
697
708
|
version: '0'
|
698
709
|
requirements: []
|
699
|
-
rubygems_version: 3.
|
710
|
+
rubygems_version: 3.3.7
|
700
711
|
signing_key:
|
701
712
|
specification_version: 4
|
702
713
|
summary: Preliminary release of cloud process execution engine (cpee.org). If you
|
data/server/routing/end.pid
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
1772897
|
@@ -1 +0,0 @@
|
|
1
|
-
1772901
|
@@ -1 +0,0 @@
|
|
1
|
-
1772905
|
data/server/routing/persist.pid
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
1772911
|