"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "zaqar/storage/mongodb/utils.py" between
zaqar-9.0.0.tar.gz and zaqar-10.0.0.tar.gz

About: OpenStack Zaqar is a multi-tenant cloud messaging and notification service for web and mobile developers.
The "Ussuri" series (latest release).

utils.py  (zaqar-9.0.0):utils.py  (zaqar-10.0.0)
skipping to change at line 258 skipping to change at line 258
"""Handles the MongoDB ConnectionFailure error. """Handles the MongoDB ConnectionFailure error.
This decorator catches MongoDB's ConnectionFailure This decorator catches MongoDB's ConnectionFailure
error and raises Zaqar's ConnectionError instead. error and raises Zaqar's ConnectionError instead.
""" """
@functools.wraps(func) @functools.wraps(func)
def wrapper(*args, **kwargs): def wrapper(*args, **kwargs):
try: try:
return func(*args, **kwargs) return func(*args, **kwargs)
except errors.ConnectionFailure as ex: except errors.ConnectionFailure:
LOG.exception(ex) LOG.exception('Connection failure.')
raise storage_errors.ConnectionError() raise storage_errors.ConnectionError()
return wrapper return wrapper
def retries_on_autoreconnect(func): def retries_on_autoreconnect(func):
"""Causes the wrapped function to be re-called on AutoReconnect. """Causes the wrapped function to be re-called on AutoReconnect.
This decorator catches MongoDB's AutoReconnect error and retries This decorator catches MongoDB's AutoReconnect error and retries
the function call. the function call.
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)