mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
tidy up logs further
This commit is contained in:
parent
d4b444f49b
commit
da34b99251
1 changed files with 4 additions and 4 deletions
|
|
@ -19,15 +19,15 @@ class ConditionPostgres:
|
||||||
def bulk_insert_surveys(
|
def bulk_insert_surveys(
|
||||||
self, surveys: List[PropertyConditionSurvey], batch_size: Optional[int] = 100
|
self, surveys: List[PropertyConditionSurvey], batch_size: Optional[int] = 100
|
||||||
) -> None:
|
) -> None:
|
||||||
logger.info(
|
logger.debug(
|
||||||
f"Preparing to load {len(surveys)} property surveys to Postgres. Mapping to SQLModel objects..."
|
f"[ConditionPostgres] Preparing to load {len(surveys)} property surveys to Postgres. Mapping to SQLModel objects..."
|
||||||
)
|
)
|
||||||
survey_models: List[PropertyConditionSurveyModel] = [
|
survey_models: List[PropertyConditionSurveyModel] = [
|
||||||
ConditionPostgres.map_survey_to_model(s) for s in surveys
|
ConditionPostgres.map_survey_to_model(s) for s in surveys
|
||||||
]
|
]
|
||||||
total: int = len(survey_models)
|
total: int = len(survey_models)
|
||||||
logger.info(
|
logger.debug(
|
||||||
f"Finished mapping {total} surveys. Writing to database in batches of {batch_size}..."
|
f"[ConditionPostgres] Finished mapping {total} surveys. Writing to database in batches of {batch_size}..."
|
||||||
)
|
)
|
||||||
|
|
||||||
with db_session() as session:
|
with db_session() as session:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue