mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-03-01 01:40:42 +00:00
use text for sql
This commit is contained in:
parent
82ec34e00b
commit
cdf5fc313a
@ -9,7 +9,7 @@ from spiffworkflow_backend.models.db import db
|
|||||||
def try_to_connect(start_time: float) -> None:
|
def try_to_connect(start_time: float) -> None:
|
||||||
"""Try to connect."""
|
"""Try to connect."""
|
||||||
try:
|
try:
|
||||||
db.first_or_404("select 1") # type: ignore
|
db.first_or_404(text("select 1")) # type: ignore
|
||||||
except sqlalchemy.exc.DatabaseError as exception:
|
except sqlalchemy.exc.DatabaseError as exception:
|
||||||
if time.time() - start_time > 15:
|
if time.time() - start_time > 15:
|
||||||
raise exception
|
raise exception
|
||||||
|
Loading…
x
Reference in New Issue
Block a user