cpee 1.5.6 → 1.5.7

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/cpee.gemspec +1 -1
  3. data/tools/cpee +22 -3
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eaad30b7640b6c68b4acb529265f577e4a53a6fd034ebd11db4dc5eae34173fe
4
- data.tar.gz: 7a3a4862bfd543268546d1385ec8d7b5ea7311b0fa4be84075b57890ff2c4bed
3
+ metadata.gz: 3b9072d66749c0b959532cde9a01d95fdf94280d6e2068e68c012027e8f94fcb
4
+ data.tar.gz: 71b87598486ac3dbb351bd2946090aed25b525f1603d8902988e0cd9ead4f61e
5
5
  SHA512:
6
- metadata.gz: b247689d4132d5ba3814197ec51dcc2e5ba8fe950610417cf0be4616a11c3dc5fa35c8804e1a533fa9749dcc5f3d37741dbc610adb4043ed52c4a40cc78e588b
7
- data.tar.gz: fdf0ceb72d630ff34fb9cdaf26d009317b8652aea51f2fe8a7a44306cfc04b14a45e377a635dbab17cab7f834e349f9817ca10ce6b11e20d27eda168c61fd25d
6
+ metadata.gz: '082193a63a7e5d2506232ae27e367c94f8689631b7b09d832053495a3dc276b1b1ed3a9c637a9523b1879bcef79c59ec2851f14735893bde43bada52ee4a5604'
7
+ data.tar.gz: 579a869a59bcd79ae5c9c5f75eaaa0e3eca6f8c4926b62f615e91ae413ede2b0e5652aa6e172413ba3e627e62854a0ee5f6a5d777cbb9f9b756005b2854b134a
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee"
3
- s.version = "1.5.6"
3
+ s.version = "1.5.7"
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). If you just need workflow execution, without a rest/xmpp service exposing it, then use WEEL"
data/tools/cpee CHANGED
@@ -33,11 +33,13 @@ ARGV.options { |opt|
33
33
  opt.on("Options:")
34
34
  opt.on("--help", "-h", "This text") { puts opt; exit }
35
35
  opt.on("")
36
- opt.on(wrap("[archive DIR URL] save properties from all finished instances listed at URL into DIR. Examples:\ncpee archive ./archive http://localhost:9298/\ncpee archive ./archive http://localhost:9298/1/"))
36
+ opt.on(wrap("[archive DIR URL] save properties from all finished instances listed at URL into DIR. Examples:\ncpee archive ./archive http://localhost:9298/\ncpee archive ./archive http://localhost:9298/1/\ncpee archive ./archive http://localhost:9298/1-200"))
37
37
  opt.on("")
38
- opt.on(wrap("[abandon URL] running processes are stopped; ready or stopped processes are abandoned.\ne.g. cpee abandon http://localhost:9298/1/"))
38
+ opt.on(wrap("[abandon URL] running processes are stopped; ready or stopped processes are abandoned. Examples:\ncpee abandon http://localhost:9298/1/\ncpee abandon http://localhost:9298/1-200"))
39
39
  opt.on("")
40
- opt.on(wrap("[delete! URL] DANGER ZONE. Vanishes forever. Not in archive.\ne.g. cpee delete! http://localhost:9298/1/"))
40
+ opt.on(wrap("[start URL] stopped processes are started; all others are not touched. Examples:\ncpee start http://localhost:9298/1-200"))
41
+ opt.on("")
42
+ opt.on(wrap("[delete! URL] DANGER ZONE. Vanishes forever. Not in archive. Examples:\ncpee delete! http://localhost:9298/1/"))
41
43
  opt.on("")
42
44
  opt.on(wrap("[new DIR] scaffolds a sample execution engine. Everything except instances can be removed for default behaviour."))
43
45
  opt.on("")
@@ -165,6 +167,23 @@ elsif command == 'abandon'
165
167
  end
166
168
  end
167
169
  end
170
+ elsif command == 'start'
171
+ base = File.dirname(p1)
172
+ names = []
173
+ if File.basename(p1) =~ /(\d+)-(\d+)/
174
+ names = ($1.to_i..$2.to_i).to_a
175
+ else
176
+ names << File.basename(p1)
177
+ end
178
+ names.each do |name|
179
+ res = Typhoeus.get(File.join(base,name.to_s,'properties','values','state','/'))
180
+ if res.success?
181
+ case res.response_body
182
+ when "stopped" then
183
+ Typhoeus.put(File.join(base,name.to_s,'properties','values','state','/'), headers: {'Content-Type' => 'application/x-www-form-urlencoded'}, body: "value=running")
184
+ end
185
+ end
186
+ end
168
187
  elsif command == 'delete!'
169
188
  Typhoeus.delete(File.join(p1,'/'))
170
189
  else
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: 1.5.6
4
+ version: 1.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler