cpee 2.0.9 → 2.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/cockpit/config.json +3 -0
  3. data/cockpit/css/track.css +17 -6
  4. data/cockpit/css/ui.css +6 -2
  5. data/cockpit/css/wfadaptor.css +1 -1
  6. data/cockpit/edit.html +1 -0
  7. data/cockpit/index.html +2 -2
  8. data/cockpit/js/instance.js +75 -55
  9. data/cockpit/js/track.js +10 -0
  10. data/cockpit/js/ui.js +47 -16
  11. data/cockpit/templates/Track Test Local.xml +82 -0
  12. data/cockpit/templates/Track Test.xml +82 -0
  13. data/cockpit/templates/instantiate.local/Take_Sub.xml +61 -0
  14. data/cockpit/templates/instantiate/Take_Perf.xml +46 -0
  15. data/cockpit/templates/instantiate/Take_Sub.xml +57 -0
  16. data/cockpit/templates/instantiate/Take_X.xml +48 -0
  17. data/cockpit/themes/compact/rngs/call.rng +5 -0
  18. data/cockpit/themes/compact/rngs/callmanipulate.rng +6 -1
  19. data/cockpit/themes/default/rngs/call.rng +5 -0
  20. data/cockpit/themes/default/rngs/callmanipulate.rng +6 -1
  21. data/cockpit/themes/extended/rngs/call.rng +5 -0
  22. data/cockpit/themes/extended/rngs/callmanipulate.rng +6 -1
  23. data/cockpit/themes/packed/rngs/call.rng +5 -0
  24. data/cockpit/themes/packed/rngs/callmanipulate.rng +6 -1
  25. data/cockpit/themes/preset/rngs/call.rng +5 -0
  26. data/cockpit/themes/preset/rngs/callmanipulate.rng +6 -1
  27. data/cockpit/track.html +37 -8
  28. data/cpee.gemspec +2 -2
  29. data/lib/cpee/implementation.rb +13 -4
  30. data/lib/cpee/implementation_notifications.rb +95 -62
  31. data/lib/cpee/persistence.rb +3 -0
  32. data/server/routing/end.pid +1 -0
  33. data/server/routing/forward-events.pid +1 -0
  34. data/server/routing/forward-events.rb +2 -1
  35. data/server/routing/forward-votes.pid +1 -0
  36. data/server/routing/forward-votes.rb +1 -1
  37. data/server/routing/persist.pid +1 -0
  38. data/server/server.conf +4 -0
  39. data/server/server.pid +1 -0
  40. data/tools/cpee +6 -7
  41. metadata +18 -6
  42. data/cockpit/templates/convert_cpee2.rb +0 -15
  43. data/cockpit/themes/convert_cpee2.rb +0 -8
@@ -62,12 +62,41 @@
62
62
  <div class='hidden' id='relaxngworker'></div>
63
63
  <div id="trackfull">
64
64
  <div id='graphcolumn'>
65
- <div id="usage">
66
- <span id="title"></span> | <span id='state'>
67
- <span id="state_text"></span>
65
+ <div id="trackusage">
66
+ <div id='tracktitle'>
67
+ <span>
68
+ <a class="x-ui-button" name="glob_reload" title='reload' href=''>
69
+ <svg viewBox="0 -1.5 7 12" width="10" height="16">
70
+ <path
71
+ style="fill:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stop-color:#000000"
72
+ d="M 3.5,1.5 C 1.431441,1.5001975 -0.24540803,3.1770466 -0.24560554,5.2456055 -0.2454082,7.3141647 1.4314408,8.991014 3.5,8.9912113 5.5685591,8.991014 7.2454081,7.3141647 7.2456054,5.2456055 7.2454079,3.1770466 5.5685589,1.5001975 3.5,1.5 Z M 3.437195,4.0616198 c 0.020931,-5.551e-4 0.041873,-5.551e-4 0.062805,0 0.6537674,3.133e-4 1.1836723,0.5302183 1.1839856,1.1839857 C 4.6836723,5.8993729 4.1537674,6.4292778 3.5,6.4295912 2.8462325,6.4292778 2.3163276,5.8993729 2.3160142,5.2456055 2.315414,4.6155841 2.8080758,4.0953252 3.437195,4.0616198 Z"/>
73
+ </svg>
74
+ </a>
75
+ <a class="x-ui-button" name="glob_edit" title='edit' target='_blank' href='' id='current-monitor'><svg viewBox="0 -1.5 7 12" width="10" height="16">
76
+ <path
77
+ style="fill:#000000;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
78
+ d="M -0.25,7.8194404 0.57057194,10.599984 3.1882886,9.3540573 Z"/>
79
+ <path
80
+ style="fill:#000000;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
81
+ d="M 3.5215262,8.6074434 6.0527848,2.9361926 2.6144961,1.4015756 0.08323736,7.0728263 Z"/>
82
+ <path
83
+ style="fill:#000000;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
84
+ d="M 6.4439758,2.0597335 6.9719316,0.87685566 3.533643,-0.6577613 3.005687,0.52511656 Z"/>
85
+ </svg></a>
86
+ <a class="x-ui-button" name="glob_unshow" title='unshow'>
87
+ <svg viewBox="0 -1.5 7 12" width="10" height="16">
88
+ <path
89
+ style="fill:#000000;stroke-width:0;stop-color:#000000"
90
+ d="M 5.75,1.4999999 3.5,3.75 1.25,1.4999999 -0.25000013,3 2,5.25 -0.25000013,7.5 1.25,9.0000002 3.5,6.75 5.75,9.0000002 7.2500001,7.5 5,5.25 7.2500001,3 Z"/>
91
+ </svg>
92
+ </a>
93
+ </span>
94
+ <span> - </span>
95
+ <span id="title">Loading ...</span>
96
+ </div>
97
+ <div id='state'>
68
98
  <span id="state_any">
69
- <span> </span>
70
- <button name="state_start" title='start'>
99
+ <button name="state_start" title='start' style='display:none'>
71
100
  <svg viewBox="0 -1.5 7 12" width="10" height="16">
72
101
  <path
73
102
  style="fill:#000000;fill-rule:evenodd;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
@@ -82,7 +111,6 @@
82
111
  </svg>
83
112
  </button>
84
113
  <span id="state_extended">
85
- <span> / </span>
86
114
  <button name="state_replay" title='replay'>
87
115
  <svg viewBox="0 -1.5 7 12" width="10" height="16">
88
116
  <path
@@ -90,7 +118,6 @@
90
118
  d="m -0.24999978,8.9999993 c 0,-2.7488167 0,-5.4976332 0,-8.24644997 C 1.1183278,0.76955385 2.4884861,0.71666052 3.8555376,0.79065567 4.5083287,0.83810218 5.2238942,1.0790874 5.5755039,1.7307256 6.1661398,2.7080902 6.0299484,4.2180754 5.1108772,4.9019222 4.7622397,5.1617467 4.3480204,5.2956156 3.9336064,5.3605366 4.9287868,5.9394132 5.4254071,7.0996814 6.0167729,8.0858876 6.1549588,8.3769029 6.4657247,8.7723933 6.5,8.9999999 c -0.5944185,0 -1.1888371,0 -1.7832559,0 C 4.0758679,7.9893475 3.4946311,6.9294648 2.7923497,5.9678488 2.4230355,5.5319748 1.8508715,5.5458842 1.3513114,5.5576027 c -0.1507526,-0.00412 -0.044576,0.272902 -0.076255,0.3990664 0,1.0144436 0,2.028887 0,3.0433307 -0.50835205,-3e-7 -1.01670555,8e-7 -1.52505618,-5e-7 z M 1.2750578,4.2411336 C 2.111059,4.2189781 2.9581852,4.3060525 3.7849326,4.1387394 4.4863715,3.8915585 4.5732952,2.6432813 3.9026802,2.2941453 3.5098807,2.068434 3.050719,2.1857044 2.6267379,2.1489138 c -0.4505578,-0.00242 -0.90112,0.00147 -1.3516801,-3.456e-4 0,0.6975176 0,1.3950347 0,2.0925522 z"
91
119
  </svg>
92
120
  </button>
93
- <span> / </span>
94
121
  <button name="state_abandon" title='abandon'>
95
122
  <svg viewBox="0 -1.5 7 12" width="10" height="16">
96
123
  <path
@@ -99,8 +126,10 @@
99
126
  </svg>
100
127
  </button>
101
128
  </span>
129
+ <span> - Status: </span>
102
130
  </span>
103
- </span>
131
+ <span id="state_text">loading ...</span>
132
+ </div>
104
133
  </div>
105
134
  <div id='graphgrid'>
106
135
  <svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:x="http://www.w3.org/1999/xlink" id='graphcanvas' width='1' height='1'></svg>
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee"
3
- s.version = "2.0.9"
3
+ s.version = "2.0.11"
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."
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
21
21
  s.email = 'juergen.mangler@gmail.com'
22
22
  s.homepage = 'http://cpee.org/'
23
23
 
24
- s.add_runtime_dependency 'riddl', '~> 0.105'
24
+ s.add_runtime_dependency 'riddl', '~> 0.108'
25
25
  s.add_runtime_dependency 'weel', '~> 1.99', '>= 1.99.90'
26
26
  s.add_runtime_dependency 'highline', '~> 2.0'
27
27
  s.add_runtime_dependency 'json', '~>2.1'
@@ -72,7 +72,9 @@ module CPEE
72
72
  opts[:infinite_loop_stop] ||= 10000
73
73
  opts[:redis_path] ||= '/tmp/redis.sock'
74
74
  opts[:redis_db] ||= 3
75
+ opts[:sse_keepalive_frequency] ||= 10
75
76
 
77
+ opts[:sse_connections] = {}
76
78
  opts[:redis] = Redis.new(path: opts[:redis_path], db: opts[:redis_db])
77
79
  opts[:statemachine] = CPEE::StateMachine.new opts[:states], %w{running simulating replaying finishing stopping abandoned finished} do |id|
78
80
  opts[:redis].get("instance:#{id}/state")
@@ -88,13 +90,20 @@ module CPEE
88
90
 
89
91
  Proc.new do
90
92
  parallel do
91
- CPEE::watch_services(@riddl_opts[:watchdog_start_off])
92
- EM.add_periodic_timer(@riddl_opts[:watchdog_frequency]) do
93
- CPEE::watch_services(@riddl_opts[:watchdog_start_off])
93
+ CPEE::watch_services(opts[:watchdog_start_off])
94
+ EM.add_periodic_timer(opts[:watchdog_frequency]) do ### start services
95
+ CPEE::watch_services(opts[:watchdog_start_off])
96
+ end
97
+ EM.defer do ### catch all sse connections
98
+ CPEE::Notifications::sse_distributor(opts)
99
+ end
100
+ EM.add_periodic_timer(opts[:sse_keepalive_frequency]) do
101
+ CPEE::Notifications::sse_heartbeat(opts)
94
102
  end
95
103
  end
104
+
96
105
  cleanup do
97
- CPEE::cleanup_services(@riddl_opts[:watchdog_start_off])
106
+ CPEE::cleanup_services(opts[:watchdog_start_off])
98
107
  end
99
108
 
100
109
  interface 'main' do
@@ -73,28 +73,32 @@ module CPEE
73
73
  id = @a[0]
74
74
  opts = @a[1]
75
75
  key = @r[-1]
76
- Riddl::Parameter::Complex.new("subscriptions","text/xml") do
77
- ret = XML::Smart::string <<-END
78
- <subscription xmlns='http://riddl.org/ns/common-patterns/notifications-producer/2.0'/>
79
- END
80
- url = CPEE::Persistence::extract_item(id,opts,File.join('handler',key,'url'))
81
- ret.root.attributes['url'] = url if url && !url.empty?
82
- items = {}
83
- CPEE::Persistence::extract_handler(id,opts,key).each do |h|
84
- t, i, v = h.split('/')
85
- items[t] ||= []
86
- items[t] << [i,v]
87
- end
88
- items.each do |k,v|
89
- ret.root.add('topic').tap do |n|
90
- n.attributes['id'] = k
91
- v.each do |e|
92
- n.add *e
76
+ if CPEE::Persistence::exists_handler?(id,opts,key)
77
+ Riddl::Parameter::Complex.new("subscriptions","text/xml") do
78
+ ret = XML::Smart::string <<-END
79
+ <subscription xmlns='http://riddl.org/ns/common-patterns/notifications-producer/2.0'/>
80
+ END
81
+ url = CPEE::Persistence::extract_item(id,opts,File.join('handler',key,'url'))
82
+ ret.root.attributes['url'] = url if url && !url.empty?
83
+ items = {}
84
+ CPEE::Persistence::extract_handler(id,opts,key).each do |h|
85
+ t, i, v = h.split('/')
86
+ items[t] ||= []
87
+ items[t] << [i,v]
88
+ end
89
+ items.each do |k,v|
90
+ ret.root.add('topic').tap do |n|
91
+ n.attributes['id'] = k
92
+ v.each do |e|
93
+ n.add *e
94
+ end
93
95
  end
94
96
  end
97
+ ret.to_s
95
98
  end
96
- ret.to_s
97
- end
99
+ else
100
+ @status = 404
101
+ end
98
102
  end
99
103
  end #}}}
100
104
 
@@ -102,19 +106,24 @@ module CPEE
102
106
  def response
103
107
  id = @a[0]
104
108
  opts = @a[1]
105
- key = Digest::MD5.hexdigest(Kernel::rand().to_s)
106
-
107
- url = @p[0].name == 'url' ? @p.shift.value : nil
108
- values = []
109
- while @p.length > 0
110
- topic = @p.shift.value
111
- base = @p.shift
112
- type = base.name
113
- values += base.value.split(',').map { |i| File.join(topic,type[0..-2],i) }
114
- end
115
- @header = CPEE::Persistence::set_handler(id,opts,key,url,values)
116
109
 
117
- Riddl::Parameter::Simple.new('key',key)
110
+ if opts[:statemachine].readonly? id
111
+ @status = 423
112
+ else
113
+ key = Digest::MD5.hexdigest(Kernel::rand().to_s)
114
+
115
+ url = @p[0].name == 'url' ? @p.shift.value : nil
116
+ values = []
117
+ while @p.length > 0
118
+ topic = @p.shift.value
119
+ base = @p.shift
120
+ type = base.name
121
+ values += base.value.split(',').map { |i| File.join(topic,type[0..-2],i) }
122
+ end
123
+ @header = CPEE::Persistence::set_handler(id,opts,key,url,values)
124
+
125
+ Riddl::Parameter::Simple.new('key',key)
126
+ end
118
127
  end
119
128
  end #}}}
120
129
 
@@ -124,15 +133,19 @@ module CPEE
124
133
  opts = @a[1]
125
134
  key = @r.last
126
135
 
127
- url = @p[0].name == 'url' ? @p.shift.value : nil
128
- values = []
129
- while @p.length > 0
130
- topic = @p.shift.value
131
- base = @p.shift
132
- type = base.name
133
- values += base.value.split(',').map { |i| File.join(topic,type[0..-2],i) }
136
+ if CPEE::Persistence::exists_handler?(id,opts,key)
137
+ url = @p[0].name == 'url' ? @p.shift.value : nil
138
+ values = []
139
+ while @p.length > 0
140
+ topic = @p.shift.value
141
+ base = @p.shift
142
+ type = base.name
143
+ values += base.value.split(',').map { |i| File.join(topic,type[0..-2],i) }
144
+ end
145
+ @header = CPEE::Persistence::set_handler(id,opts,key,url,values,true)
146
+ else
147
+ @status = 404
134
148
  end
135
- @header = CPEE::Persistence::set_handler(id,opts,key,url,values,true)
136
149
  end
137
150
  end #}}}
138
151
 
@@ -146,41 +159,61 @@ module CPEE
146
159
  opts = @a[1]
147
160
  key = @r.last
148
161
 
149
- DeleteSubscription::set(id,opts,key)
162
+ if CPEE::Persistence::exists_handler?(id,opts,key)
163
+ DeleteSubscription::set(id,opts,key)
164
+ else
165
+ @status = 404
166
+ end
150
167
  nil
151
168
  end
152
169
  end #}}}
153
170
 
154
- class SSE < Riddl::SSEImplementation #{{{
155
- def onopen
156
- @id = @a[0]
157
- @opts = @a[1]
158
- @key = @r[-2]
159
- @conn = Redis.new(path: @opts[:redis_path], db: @opts[:redis_db])
160
- EM.defer do
161
- @conn.subscribe("forward:#{@id}/#{@key}", "forward-end:#{@id}/#{@key}") do |on|
162
- on.message do |what, message|
163
- if what == "forward-end:#{@id}/#{@key}"
164
- @conn.unsubscribe
165
- else
166
- send message
171
+ def self::sse_distributor(opts) #{{{
172
+ conn = Redis.new(path: opts[:redis_path], db: opts[:redis_db])
173
+ conn.psubscribe('forward:*','event:state/change') do |on|
174
+ on.pmessage do |pat, what, message|
175
+ if pat == 'forward:*'
176
+ _, id, key = what.match(/forward(-end)?:([^\/]+)\/(.+)/).captures
177
+ opts.dig(:sse_connections,id.to_i,key)&.send message
178
+ elsif pat == 'event:state/change'
179
+ mess = JSON.parse(message[message.index(' ')+1..-1])
180
+ state = mess.dig('content','state')
181
+ if state == 'finished' || state == 'abandoned'
182
+ opts.dig(:sse_connections,mess.dig('instance').to_i)&.each do |key,sse|
183
+ EM.add_timer(2) do # just to be sure that all messages arrived
184
+ sse.close
185
+ end
167
186
  end
168
187
  end
169
188
  end
170
- @conn.close
171
189
  end
172
- EM.defer do
173
- until closed?
174
- send_with_id 'hearbeat', '42'
175
- sleep 10
176
- end
190
+ end
191
+ conn.close
192
+ end #}}}
193
+ def self::sse_heartbeat(opts) #{{{
194
+ opts.dig(:sse_connections).each do |id,keys|
195
+ keys.each do |key,sse|
196
+ sse.send_with_id('heartbeat', '42') unless sse&.closed?
197
+ end
198
+ end
199
+ end #}}}
200
+ class SSE < Riddl::SSEImplementation #{{{
201
+ def onopen
202
+ @opts = @a[1]
203
+ @id = @a[0]
204
+ @key = @r[-2]
205
+ if !@opts[:statemachine].readonly?(@id) && CPEE::Persistence::exists_handler?(@id,@opts,@key)
206
+ @opts[:sse_connections][@id] ||= {}
207
+ @opts[:sse_connections][@id][@key] = self
208
+ true
209
+ else
210
+ false
177
211
  end
178
212
  end
179
213
 
180
214
  def onclose
181
- tredis = Redis.new(path: @opts[:redis_path], db: @opts[:redis_db])
182
- tredis.publish("forward-end:#{@id}/#{@key}",true)
183
- tredis.close
215
+ @opts.dig(:sse_connections,@id)&.delete(@key)
216
+ @opts.dig(:sse_connections)&.delete(@id) if @opts.dig(:sse_connections,@id)&.length == 0
184
217
  DeleteSubscription::set(@id,@opts,@key)
185
218
  end
186
219
  end #}}}
@@ -125,6 +125,9 @@ module CPEE
125
125
  def self::extract_handler(id,opts,key) #{{{
126
126
  opts[:redis].smembers("instance:#{id}/handlers/#{key}")
127
127
  end #}}}
128
+ def self::exists_handler?(id,opts,key) #{{{
129
+ opts[:redis].exists?("instance:#{id}/handlers/#{key}")
130
+ end #}}}
128
131
  def self::extract_handlers(id,opts) #{{{
129
132
  opts[:redis].smembers("instance:#{id}/handlers").map do |e|
130
133
  [e, opts[:redis].get("instance:#{id}/handlers/#{e}/url")]
@@ -0,0 +1 @@
1
+ 189089
@@ -0,0 +1 @@
1
+ 189071
@@ -39,7 +39,8 @@ Daemonite.new do |opts|
39
39
  if url.nil? || url == ""
40
40
  redis.publish("forward:#{instance}/#{key}",mess)
41
41
  else
42
- client = Riddl::Client.new(url,'http://riddl.org/ns/common-patterns/notifications-consumer/2.0/consumer.xml')
42
+ p "#{type}/#{topic}/#{event}-#{url}"
43
+ client = Riddl::Client.new(url)
43
44
  client.post [
44
45
  Riddl::Parameter::Simple::new('type',type),
45
46
  Riddl::Parameter::Simple::new('topic',topic),
@@ -0,0 +1 @@
1
+ 189081
@@ -70,7 +70,7 @@ Daemonite.new do |opts|
70
70
  persist_handler instance, callback_key, m, redis
71
71
  redis.publish("forward:#{instance}/#{subscription_key}",mess)
72
72
  else
73
- client = Riddl::Client.new(url,'http://riddl.org/ns/common-patterns/notifications-consumer/2.0/consumer.xml')
73
+ client = Riddl::Client.new(url)
74
74
  callback = m['instance-url'] + '/callbacks/' + subscription_key
75
75
  status, result, headers = (client.post [
76
76
  Riddl::Header.new("CPEE-BASE",m['cpee']),
@@ -0,0 +1 @@
1
+ 189085
@@ -0,0 +1,4 @@
1
+ :host: tango.wst.univie.ac.at
2
+ :port: 8298
3
+ :url: http://tango.wst.univie.ac.at:8298
4
+ :secure: false
@@ -0,0 +1 @@
1
+ 189185
data/tools/cpee CHANGED
@@ -162,7 +162,7 @@ elsif command == 'archive'
162
162
  XML::Smart.string(res.response_body) do |doc|
163
163
  if doc.root.qname.to_s == "instances"
164
164
  doc.root.children.each do |i|
165
- if ["finished","abandoned"].include?(i.attributes['state'])
165
+ if ["finished","abandoned"].include?(i.attributes['state']) || (["ready"].include?(i.attributes['state']) && Time.parse(i.attributes['changed']).to_i < Time.now-(60*60*24))
166
166
  prop = Typhoeus.get(File.join(base,name.to_s,i.attributes['id'],'properties','/'))
167
167
  if prop.success?
168
168
  File.write(File.join(p1,i.attributes['uuid'] + '.xml'),prop.response_body) if prop.headers['Content-Type'] =~ /^(text|application)\/xml/
@@ -175,7 +175,7 @@ elsif command == 'archive'
175
175
  if prop.success?
176
176
  xprop = XML::Smart::string(prop.response_body)
177
177
  xprop.register_namespace 'p', 'http://cpee.org/ns/properties/2.0'
178
- if ["finished","abandoned"].include?(xprop.find("string(/p:properties/p:state)"))
178
+ if ["finished","abandoned"].include?(xprop.find("string(/p:properties/p:state)")) || (["ready"].include?(xprop.find("string(/p:properties/p:state)")) && Time.parse(xprop.find("string(/p:properties/p:state/@changed)")) < Time.now-(60*60*12))
179
179
  uuid = xprop.find("string(/p:properties/p:attributes/p:uuid)")
180
180
  id = name.to_s
181
181
  File.write(File.join(p1,uuid + '.xml'),prop.response_body) if prop.headers['Content-Type'] =~ /^(text|application)\/xml/
@@ -209,11 +209,10 @@ elsif command == 'abandon'
209
209
  names << File.basename(p1)
210
210
  end
211
211
  names.each do |name|
212
- res = Typhoeus.get(File.join(base,name.to_s,'properties','state','/'))
213
- if res.success?
214
- case res.response_body
215
- when "ready", "stopped" then
216
- Typhoeus.put(File.join(base,name.to_s,'properties','state','/'), headers: {'Content-Type' => 'application/x-www-form-urlencoded'}, body: "value=abandoned")
212
+ res1 = Typhoeus.get(File.join(base,name.to_s,'properties','state','/'))
213
+ if res1.success?
214
+ if res1.response_body == 'ready' || res1.response_body == 'stopped'
215
+ Typhoeus.put(File.join(base,name.to_s,'properties','state','/'), headers: {'Content-Type' => 'application/x-www-form-urlencoded'}, body: "value=abandoned")
217
216
  end
218
217
  end
219
218
  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.0.9
4
+ version: 2.0.11
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: 2020-10-14 00:00:00.000000000 Z
13
+ date: 2020-10-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: riddl
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: '0.105'
21
+ version: '0.108'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - "~>"
27
27
  - !ruby/object:Gem::Version
28
- version: '0.105'
28
+ version: '0.108'
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: weel
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -117,6 +117,7 @@ files:
117
117
  - README.md
118
118
  - Rakefile
119
119
  - cockpit/README
120
+ - cockpit/config.json
120
121
  - cockpit/contrib/graph_example.svg
121
122
  - cockpit/contrib/legend.svg
122
123
  - cockpit/contrib/symbols.svg
@@ -127,6 +128,7 @@ files:
127
128
  - cockpit/css/track.css
128
129
  - cockpit/css/ui.css
129
130
  - cockpit/css/wfadaptor.css
131
+ - cockpit/edit.html
130
132
  - cockpit/graph.html
131
133
  - cockpit/index.html
132
134
  - cockpit/js/details.js
@@ -192,8 +194,13 @@ files:
192
194
  - cockpit/templates/IUPC arXiv:1104.3609 P34 1.xml
193
195
  - cockpit/templates/IUPC arXiv:1104.3609 P34 2.xml
194
196
  - cockpit/templates/IUPC arXiv:1104.3609 P34 3.xml
197
+ - cockpit/templates/Track Test Local.xml
198
+ - cockpit/templates/Track Test.xml
195
199
  - cockpit/templates/Worklist.xml
196
- - cockpit/templates/convert_cpee2.rb
200
+ - cockpit/templates/instantiate.local/Take_Sub.xml
201
+ - cockpit/templates/instantiate/Take_Perf.xml
202
+ - cockpit/templates/instantiate/Take_Sub.xml
203
+ - cockpit/templates/instantiate/Take_X.xml
197
204
  - cockpit/themes/compact/rngs/alternative.rng
198
205
  - cockpit/themes/compact/rngs/call.rng
199
206
  - cockpit/themes/compact/rngs/callmanipulate.rng
@@ -234,7 +241,6 @@ files:
234
241
  - cockpit/themes/compact/symbols/stop.svg
235
242
  - cockpit/themes/compact/symbols/terminate.svg
236
243
  - cockpit/themes/compact/theme.js
237
- - cockpit/themes/convert_cpee2.rb
238
244
  - cockpit/themes/default/rngs/alternative.rng
239
245
  - cockpit/themes/default/rngs/call.rng
240
246
  - cockpit/themes/default/rngs/callmanipulate.rng
@@ -502,10 +508,16 @@ files:
502
508
  - server/resources/topics.xml
503
509
  - server/resources/transformation.xml
504
510
  - server/resources/transformation_dslx.xsl
511
+ - server/routing/end.pid
505
512
  - server/routing/end.rb
513
+ - server/routing/forward-events.pid
506
514
  - server/routing/forward-events.rb
515
+ - server/routing/forward-votes.pid
507
516
  - server/routing/forward-votes.rb
517
+ - server/routing/persist.pid
508
518
  - server/routing/persist.rb
519
+ - server/server.conf
520
+ - server/server.pid
509
521
  - server/server.rb
510
522
  - tools/cpee
511
523
  - tools/server/resources/notifications/logging/subscription.xml