##// END OF EJS Templates
pyro: Return new proxy instances if called from outside of a request context....
Martin Bornhold -
r354:4f555b55 default
parent child Browse files
Show More
@@ -214,7 +214,16 b' class RequestScopeProxyFactory(object):'
214 """
214 """
215 Call this to get the pyro proxy instance for the request.
215 Call this to get the pyro proxy instance for the request.
216 """
216 """
217 # Return already borrowed proxy for this request
217
218 # If called without a request context we return new proxy instances
219 # on every call. This allows to run e.g. invoke tasks.
220 if request is None:
221 log.info('Creating pyro proxy without request context for '
222 'remote_uri=%s', self._remote_uri)
223 return Pyro4.Proxy(self._remote_uri)
224
225 # If there is an already borrowed proxy for the request context we
226 # return that instance instead of creating a new one.
218 if request in self._borrowed_proxies:
227 if request in self._borrowed_proxies:
219 return self._borrowed_proxies[request]
228 return self._borrowed_proxies[request]
220
229
General Comments 0
You need to be logged in to leave comments. Login now