Add try select 1;

pull/626/head
Andrey Dolgolev 2022-06-02 23:39:11 +03:00
rodzic 98fc39b11c
commit cdfc970f37
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -59,6 +59,11 @@ def data_generate(
with yield_db_read_only_session_ctx() as db_session:
try:
db_session.execute("SELECT 1")
except Exception as e:
db_session.rollback()
if file_type == "csv":
csv_buffer = StringIO()
csv_writer = csv.writer(csv_buffer, delimiter=";")