[ARVADOS] updated: 043002e8d0dfd2a5dbb3cfc135ac21732c199c05
git at public.curoverse.com
git at public.curoverse.com
Thu May 15 20:47:25 EDT 2014
Summary of changes:
apps/workbench/app/models/arvados_api_client.rb | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
via 043002e8d0dfd2a5dbb3cfc135ac21732c199c05 (commit)
from 278fe7048f9035b350a60e032432c9119f151add (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 043002e8d0dfd2a5dbb3cfc135ac21732c199c05
Author: Tom Clegg <tom at curoverse.com>
Date: Thu May 15 20:44:28 2014 -0400
2809: Fix disappearing ArvadosApiClient in development mode. refs #2809
diff --git a/apps/workbench/app/models/arvados_api_client.rb b/apps/workbench/app/models/arvados_api_client.rb
index 25e776a..a7ae8ba 100644
--- a/apps/workbench/app/models/arvados_api_client.rb
+++ b/apps/workbench/app/models/arvados_api_client.rb
@@ -13,7 +13,14 @@ class ArvadosApiClient
# An API client object suitable for handling API requests on behalf
# of the current thread.
def self.new_or_current
- Thread.current[:arvados_api_client] ||= new
+ # If this thread doesn't have an API client yet, *or* this model
+ # has been reloaded since the existing client was created, create
+ # a new client. Otherwise, keep using the latest client created in
+ # the current thread.
+ unless Thread.current[:arvados_api_client].andand.class == self
+ Thread.current[:arvados_api_client] = new
+ end
+ Thread.current[:arvados_api_client]
end
def initialize *args
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list