rbbt-util 5.21.0 → 5.21.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
  SHA1:
3
- metadata.gz: 752166bf720d5525c25bf96a2a01915c5ee7430c
4
- data.tar.gz: 973d98ccede9449355b494982789b8cb82c325e1
3
+ metadata.gz: 43d6d582cf3e21efe8d44e4de2fc5c3876a68952
4
+ data.tar.gz: 5e59abd703c37d6efc9d98207e6a34d03518d41a
5
5
  SHA512:
6
- metadata.gz: 31ee0806440ed08fd319e7dfe9cbcd524ec7f40bbe10cfa8b56c411172d0e27d84397b8a64674000b6b340f433e79425fa8a779d640a802c3d835cc861e7df49
7
- data.tar.gz: 7763048e9ee7786cb9270e9656b821093c5d67e2f2bdef8f1fc3448b11b0fa187fcf1f53a6918de4918a759bfec4ee4755b07313015efb6620895583cb4e9549
6
+ metadata.gz: 2ce8696409ef7d33c8a9b2ee05dc844785b813ae234837340e6f9da7a4814f97409a32f379ee480b5326f529fd02ed22bd0bf7b4607bfb2a112d27b75cf00793
7
+ data.tar.gz: c2dbb0ebf44122f4dcb1b8610d11e6e2ecb236993a43a84aefd21a4ae39e2ed9f6256e497f4ef84ebfc6aff0da317f749ec91b72f8061c3099c097d64661e9b3
data/lib/rbbt/persist.rb CHANGED
@@ -339,7 +339,9 @@ module Persist
339
339
  type ||= :marshal
340
340
 
341
341
  persist_options ||= {}
342
- return (persist_options[:repo] || Persist::MEMORY)[persist_options[:file]] ||= yield if type ==:memory and persist_options[:file] and persist_options[:persist] and persist_options[:persist] != :update
342
+ if type ==:memory and persist_options[:file] and persist_options[:persist] and persist_options[:persist] != :update and not persist_options[:update]
343
+ return (persist_options[:repo] || Persist::MEMORY)[persist_options[:file]] ||= yield
344
+ end
343
345
 
344
346
  if FalseClass === persist_options[:persist]
345
347
  yield
@@ -358,7 +360,8 @@ module Persist
358
360
  case
359
361
  when type.to_sym == :memory
360
362
  repo = persist_options[:repo] || Persist::MEMORY
361
- repo[path.find] ||= yield
363
+ path = path.find if Path === path
364
+ repo[path] = yield
362
365
 
363
366
  when (type.to_sym == :annotations and persist_options.include? :annotation_repo)
364
367
 
@@ -95,7 +95,7 @@ class WorkflowRESTClient
95
95
  RestClient.post(URI.encode(url), params)
96
96
  end
97
97
 
98
- Log.debug{ "RestClient post_jobname: #{ url } - #{Misc.fingerprint params}: #{name}" }
98
+ Log.debug{ "RestClient jobname returned for #{ url } - #{Misc.fingerprint params}: #{name}" }
99
99
 
100
100
  name
101
101
  end
@@ -112,7 +112,7 @@ class WorkflowRESTClient
112
112
 
113
113
  def info(check_lock=false)
114
114
  @done = @info && @info[:status] && @info[:status].to_sym == :done
115
- @info = Persist.memory("RemoteSteps Info", :url => @url, :persist => !!@done) do
115
+ @info = Persist.memory("RemoteSteps Info", :url => @url, :persist => true, :update => !@done) do
116
116
  init_job unless @url
117
117
  info = WorkflowRESTClient.get_json(File.join(@url, 'info'))
118
118
  info = WorkflowRESTClient.fix_hash(info)
@@ -214,6 +214,7 @@ class WorkflowRESTClient
214
214
  end
215
215
 
216
216
  def join
217
+ Log.debug{ "Joining RestClient: #{path}" }
217
218
  if IO === @result
218
219
  res = @result
219
220
  @result = nil
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.21.0
4
+ version: 5.21.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez