Implemented force exit on connection failure
This commit is contained in:
@ -17,6 +17,7 @@ def set_connection():
|
|||||||
logger.info('Connection to PostreSQL DB set successfully')
|
logger.info('Connection to PostreSQL DB set successfully')
|
||||||
except psycopg2.Error as e:
|
except psycopg2.Error as e:
|
||||||
logger.error(f'Failed to set connection to the PostgreSQL DB: {e.pgerror}')
|
logger.error(f'Failed to set connection to the PostgreSQL DB: {e.pgerror}')
|
||||||
|
exit()
|
||||||
|
|
||||||
|
|
||||||
def close_connection(connection):
|
def close_connection(connection):
|
||||||
|
|||||||
Reference in New Issue
Block a user