rbbt-util 5.20.16 → 5.20.17

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
  SHA1:
3
- metadata.gz: f8ff80d80e35fa0ba2bbdc6fb626a00ae0097973
4
- data.tar.gz: eae7437a6901578f908d32bdadf109c339be8794
3
+ metadata.gz: 4c41cee8649e66a887dc5fbdab8f2a6a123a7c18
4
+ data.tar.gz: 5e74310b2dbca57f155c6a302a18f5753df9f901
5
5
  SHA512:
6
- metadata.gz: caf52df7da1aac95ec53d5883c1a49f26170bdb95f09b039321e435078b74969abdcbecb594b12e736d9a9640aebf0eb73d902a308242fc734dd537c650a0a42
7
- data.tar.gz: 76592f03fe4bcfe0881a8c8e0e2e943829cda0ae03116b8c4410ee350119c9499dd829c6f407a6d2d461d33e921d650bed2b5eb68129d7784deaf54583410f39
6
+ metadata.gz: 97b0fe64074065c291c3db7b77cd3e27337c5e9728333001c014e0bc4fa3e344b9a07c502187d8255e565fc7b85dce915fcf2bc8a89b8437138f356b3bad7b0b
7
+ data.tar.gz: f5e5cdcbea2b6193d7eb1208d363a326d5d7ace4e7bc0a712b9ce2f9bd5ff2deb6411019a95274c4d871d424674329bd2318388544edb00fc52a254ea64ac510
@@ -90,7 +90,7 @@ class WorkflowRESTClient
90
90
  params = params.merge({ :_format => 'jobname' })
91
91
  params = fix_params params
92
92
 
93
- params = WorkflowRESTClient.__prepare_inputs_for_restclient(params)
93
+ WorkflowRESTClient.__prepare_inputs_for_restclient(params)
94
94
  name = capture_exception do
95
95
  RestClient.post(URI.encode(url), params)
96
96
  end
@@ -1,8 +1,6 @@
1
1
  class WorkflowRESTClient
2
2
 
3
3
  def self.__prepare_inputs_for_restclient(inputs)
4
-
5
- new = IndiferentHash.setup({})
6
4
  inputs.each do |k,v|
7
5
  if v.respond_to? :path and not v.respond_to? :original_filename
8
6
  class << v
@@ -13,13 +11,9 @@ class WorkflowRESTClient
13
11
  end
14
12
 
15
13
  if Array === v and v.empty?
16
- new[k] = "EMPTY_ARRAY"
17
- else
18
- new[k] = v
14
+ inputs[k] = "EMPTY_ARRAY"
19
15
  end
20
16
  end
21
-
22
- new
23
17
  end
24
18
 
25
19
  class RemoteStep < Step
@@ -57,7 +51,7 @@ class WorkflowRESTClient
57
51
  inputs.each do |k,v|
58
52
  stream = stream_input.to_s == k.to_s
59
53
  if Step === v
60
- unless (v.done? or v.streaming? or RestClient::Step === v)
54
+ unless (v.done? or v.streaming?) # or RestClient::Step === v)
61
55
  v.run(true) and v.grace
62
56
  end
63
57
 
@@ -113,6 +107,7 @@ class WorkflowRESTClient
113
107
 
114
108
  def status
115
109
  return :done if @done
110
+ return nil unless url or started?
116
111
  return :streaming if @streaming
117
112
  begin
118
113
  status = info[:status]
@@ -201,6 +196,7 @@ class WorkflowRESTClient
201
196
  @result = nil
202
197
  Misc.consume_stream(res, true)
203
198
  end
199
+ self.info unless self.done?
204
200
  sleep 0.2 unless self.done?
205
201
  sleep 1 unless self.done?
206
202
  while not self.done?
@@ -260,7 +256,7 @@ class WorkflowRESTClient
260
256
  get_streams
261
257
  if cache_type == :stream or cache_type == :exec and stream_input and inputs[stream_input]
262
258
  task_url = URI.encode(File.join(base_url, task.to_s))
263
- inputs = WorkflowRESTClient.__prepare_inputs_for_restclient(inputs)
259
+ WorkflowRESTClient.__prepare_inputs_for_restclient(inputs)
264
260
  task_params = inputs.merge(:_cache_type => cache_type, :jobname => base_name, :_format => [:string, :boolean, :tsv, :annotations].include?(result_type) ? :raw : :json)
265
261
  @streaming = true
266
262
  io = WorkflowRESTClient.stream_job(task_url, task_params, stream_input, cache_type)
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.20.16
4
+ version: 5.20.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez