rbbt-util 5.26.137 → 5.26.138

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: 5517c44e5438fffb2c8e3fddbb99fef53084bbda02f74f7866fd51f8b7eadef9
4
- data.tar.gz: 4aeba437356614ef827b9224169dfe7c84e543bf6ea5e87426bb545b71afe8ad
3
+ metadata.gz: 3395ce507ce964baafd451130074f1dfe015dc02a8ce628e8d9a1df6d367e266
4
+ data.tar.gz: 567a8746b42db94b3c72834bbda864a4fb94457ace3e73be3801a0f5370fd2e8
5
5
  SHA512:
6
- metadata.gz: 4d0474e8b079996176dc6f9947ec190c5b0b80cc8d0d4770f886556d69cb05fc943e04766c8679933efde4554811a0be225c5646823d31e2bd9e208a96a7dcb4
7
- data.tar.gz: 47c703e6745fc998bef9d1304a55177a9d3607adff270061981d4c19adab11b8b8bf3ed2d7308a5e9504878bef0aad46105a47857b418b37674d924d9434c5ed
6
+ metadata.gz: 7f8d073bff06ff3b4ae7495b700be46b393245b33fe31e4de9ead6d1b5625448367cc07263563b825188c972251684358bd0abf7280fe32927d8513be27b2fdd
7
+ data.tar.gz: 9b0561a1ca0fc9c33b63e4098e3efe8997bd64e073acb16895e0ee9e7391884aee6a22707463c6a11784201b65a9706d25e36af6c4059d9af6e7de799e06888b
@@ -34,7 +34,7 @@ class WorkflowRemoteClient
34
34
  def run(no_load = false)
35
35
  no_load = @is_stream ? :stream : true if no_load
36
36
 
37
- @mutex.synchronize do
37
+ @result ||= @mutex.synchronize do
38
38
  begin
39
39
  if @is_exec
40
40
  exec(no_load)
@@ -44,8 +44,10 @@ class WorkflowRemoteClient
44
44
  init_job
45
45
  nil
46
46
  else
47
- init_job
48
- join
47
+ if ! done?
48
+ init_job
49
+ join
50
+ end
49
51
  self.load
50
52
  end
51
53
  ensure
@@ -229,6 +231,7 @@ class WorkflowRemoteClient
229
231
  end
230
232
 
231
233
  def join
234
+ return true if cache_files.any?
232
235
  init_job unless @url
233
236
  Log.debug{ "Joining RestClient: #{path}" }
234
237
  if IO === @result
@@ -251,6 +254,7 @@ class WorkflowRemoteClient
251
254
  end
252
255
 
253
256
  def load_res(res, result_type = nil)
257
+
254
258
  stream = true if res.respond_to? :read
255
259
  join unless stream
256
260
  result_type ||= self.result_type
@@ -183,7 +183,7 @@ module WorkflowRESTClient
183
183
  params = {}
184
184
  join unless done? or streaming?
185
185
  raise get_exception if error? or aborted?
186
- load_res get
186
+ load_res get, (result_type == :array ? :json : result_type)
187
187
  end
188
188
 
189
189
  def exec_job
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbbt-util
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.26.137
4
+ version: 5.26.138
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez