chore: add success log whenever a connection is working (#13811)
This commit is contained in:
parent
9fa52b50ed
commit
9f53c6c5bc
|
|
@ -115,6 +115,12 @@ class TestConnectionDatabaseCommand(BaseCommand):
|
|||
if not engine.dialect.do_ping(conn):
|
||||
raise DBAPIError(None, None, None)
|
||||
|
||||
# Log succesful connection test with engine
|
||||
event_logger.log_with_context(
|
||||
action="test_connection_success",
|
||||
engine=database.db_engine_spec.__name__,
|
||||
)
|
||||
|
||||
except (NoSuchModuleError, ModuleNotFoundError) as ex:
|
||||
event_logger.log_with_context(
|
||||
action=f"test_connection_error.{ex.__class__.__name__}",
|
||||
|
|
|
|||
Loading…
Reference in New Issue