Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Decorator
- @decorator
- def check_db_connection(func, *args, **kwargs):
- try:
- db.get_conn().ping(True)
- except:
- logging.error(traceback.format_exc())
- return func(*args, **kwargs)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement