choria-mcorpc-support 2.26.0 → 2.26.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4edceb07e1b046286da6d475f5bea4391a6851b8e49e82af7373a151b476755a
4
- data.tar.gz: 37e7c6e320f2742a9dd2722ad2531dd710745880ad09926f15d554ebe3fefb88
3
+ metadata.gz: d38a022de3a9f8e30351c3281d34011f84d792d09f13955b705ff2ff5502140b
4
+ data.tar.gz: a3a5ce9b97f9b479b7530b7af1645a20049a15d4dbc2f6159539c6731c441eee
5
5
  SHA512:
6
- metadata.gz: 11c2d30b7266823e70ed2d865d453c4f43ce5f0dc326bd7a963774240ccda4151d863f22ae327ec2f5e073df92cdf50af1b888c7a799e1967000ce497ff00bfc
7
- data.tar.gz: 5ca64410539e9f6b984c084b20e13f1d049e23e2677c533fa2a1b0c7c7966c2df340d6918a35a8b45013785a32ef66cc777c5237adfb382213232c2c1c20c02e
6
+ metadata.gz: 95d4ad08da80cccbb2f4904764bb4285ada306dc023cc922543cafe89aaf66eabf04ddda44e1b1290b9a212bb66a44430009e8d48c135382a7c830b9d89a3f7a
7
+ data.tar.gz: 99a3586fc1327ae2597a642c9105c3418622fc0c058977ec0b95ea6dbbbd75af215fb1fee66e023c97b61d72d7207c23a87cc41d6680aa5ef2c1520eb8a910e6
@@ -213,7 +213,9 @@ Examples:
213
213
  Util.colorize(:bold, bolt_tasks.ddl.meta[:timeout])
214
214
  ])
215
215
 
216
- request_and_report(:run_and_wait, request)
216
+ success = request_and_report(:run_and_wait, request)
217
+
218
+ exit(success ? 0 : 1)
217
219
  end
218
220
  ensure
219
221
  reset_client!
@@ -273,11 +275,15 @@ Examples:
273
275
  else
274
276
  say("Requesting task status for request %s, showing failures only pass --verbose for all output" % Util.colorize(:bold, taskid)) unless options[:verbose]
275
277
 
276
- request_and_report(:task_status, {:task_id => taskid}, taskid)
278
+ success = request_and_report(:task_status, {:task_id => taskid}, taskid)
279
+
280
+ exit(success ? 0 : 1)
277
281
  end
278
282
  end
279
283
 
280
284
  def request_and_report(action, arguments, taskid=nil) # rubocop:disable Metrics/MethodLength
285
+ res = true
286
+
281
287
  task_not_known_nodes = 0
282
288
  wrapper_failure = 0
283
289
  completed_nodes = 0
@@ -302,16 +308,24 @@ Examples:
302
308
  status = reply[:data]
303
309
 
304
310
  if reply[:statuscode] == 3
311
+ res = false
305
312
  fail_nodes += 1
306
313
  task_not_known_nodes += 1
307
314
  elsif [-1, 0].include?(status[:exitcode])
308
315
  status[:completed] ? completed_nodes += 1 : running_nodes += 1
309
316
  runtime += status[:runtime]
310
- reply[:statuscode] == 0 ? success_nodes += 1 : fail_nodes += 1
317
+ if reply[:statuscode] == 0
318
+ success_nodes += 1
319
+ else
320
+ res = false
321
+ fail_nodes += 1
322
+ end
311
323
  elsif reply[:statuscode] == 5
324
+ res = false
312
325
  wrapper_failure += 1
313
326
  fail_nodes += 1
314
327
  else
328
+ res = false
315
329
  fail_nodes += 1
316
330
  end
317
331
 
@@ -351,6 +365,8 @@ Examples:
351
365
  runtime,
352
366
  bolt_tasks.stats
353
367
  )
368
+
369
+ res
354
370
  ensure
355
371
  reset_client!
356
372
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: choria-mcorpc-support
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.26.0
4
+ version: 2.26.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - R.I.Pienaar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-23 00:00:00.000000000 Z
11
+ date: 2022-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: systemu
@@ -247,7 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
247
247
  version: '0'
248
248
  requirements: []
249
249
  rubyforge_project:
250
- rubygems_version: 2.7.6.2
250
+ rubygems_version: 2.7.6.3
251
251
  signing_key:
252
252
  specification_version: 4
253
253
  summary: Support libraries the Choria Server