mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
add image update logging
This commit is contained in:
parent
a495c930a1
commit
757c224113
1 changed files with 9 additions and 0 deletions
|
|
@ -10,6 +10,10 @@ from etl.hubspot.s3_uploader import S3Uploader
|
|||
from backend.app.db.connection import db_read_session
|
||||
from backend.app.db.models.organisation import Organisation
|
||||
from etl.hubspot.utils import parse_hs_date
|
||||
from utils.logger import setup_logger
|
||||
|
||||
|
||||
logger = setup_logger()
|
||||
|
||||
|
||||
class HubspotDataToDb:
|
||||
|
|
@ -272,7 +276,12 @@ class HubspotDataToDb:
|
|||
return
|
||||
|
||||
if fresh_photo_url != existing_deal.major_condition_issue_photos:
|
||||
logger.info(
|
||||
f"Hubspot image URL changed from {existing_deal.major_condition_issue_photos} to {fresh_photo_url}"
|
||||
)
|
||||
self._upload_photo_to_s3(existing_deal, fresh_photo_url, hubspot_client)
|
||||
else:
|
||||
logger.info(f"Hubspot iamge URL unchanged: {fresh_photo_url}")
|
||||
|
||||
def _handle_new_photo_upload(
|
||||
self,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue