init
Initializes the database connection by attempting to execute a simple query to verify the database is responsive. This function performs network I/O, logs connection attempts, and utilizes a retry mechanism with fixed wait intervals before raising an exception if the connection fails.
def init(
db_engine: Engine
) - > None
Verifies the database connection by attempting to execute a simple query and retries upon failure. This function ensures the database is responsive before the application proceeds with further operations.
Parameters
| Name | Type | Description |
|---|---|---|
| db_engine | Engine | The SQLAlchemy or SQLModel engine instance used to establish a connection with the target database. |
Returns
| Type | Description |
|---|---|
None | Nothing is returned upon a successful connection check. |