Esempio n. 1
0
 def _db_connect():
     try:
         DB.connect()
     except OperationalError:
         LOGGER.exception("Error occured while connecting to database. %s",
                          format_exc())
         abort(503, "DB is not running")
Esempio n. 2
0
 def _db_close(exc):  # pylint: disable=unused-argument
     if not DB.is_closed():
         DB.close()
Esempio n. 3
0
 def _db_connect():
     DB.connect()