use text for sql

This commit is contained in:
burnettk 2023-03-29 15:51:04 -04:00
parent e0d96ed837
commit 96a6304e82
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@ from spiffworkflow_backend.models.db import db
def try_to_connect(start_time: float) -> None:
"""Try to connect."""
try:
db.first_or_404("select 1") # type: ignore
db.first_or_404(text("select 1")) # type: ignore
except sqlalchemy.exc.DatabaseError as exception:
if time.time() - start_time > 15:
raise exception