do the database write

This commit is contained in:
Daniel Roth 2026-02-10 09:59:23 +00:00
parent da34b99251
commit df6c42933a

View file

@ -32,17 +32,17 @@ class ConditionPostgres:
with db_session() as session: with db_session() as session:
logger.info("[ConditionPostgres] Successfully made connection to database") logger.info("[ConditionPostgres] Successfully made connection to database")
# for start in range(0, total, batch_size): for start in range(0, total, batch_size):
# end = min(start + batch_size, total) end = min(start + batch_size, total)
# batch = survey_models[start:end] batch = survey_models[start:end]
# t0: float = time.perf_counter() t0: float = time.perf_counter()
# ConditionPostgres._insert_surveys_batch(batch, session) ConditionPostgres._insert_surveys_batch(batch, session)
# elapsed: float = time.perf_counter() - t0 elapsed: float = time.perf_counter() - t0
# logger.info( logger.info(
# f"Inserted batch {start} - {end} ({len(batch)} surveys) in {elapsed} seconds", f"Inserted batch {start} - {end} ({len(batch)} surveys) in {elapsed} seconds",
# ) )
@staticmethod @staticmethod
def map_survey_to_model( def map_survey_to_model(