modified script to re run existing scripts

This commit is contained in:
Jun-te Kim 2025-07-15 15:21:31 +00:00
parent 0811339557
commit b3f9929554

View file

@ -16,10 +16,17 @@ from etl.hubSpotClient.hubspot import DealStage, HubSpotClient
os.environ["DATABASE_URL"] = "postgresql://postgres:makingwarmhomes@db:5432/postgres"
hubspotClient = HubSpotClient()
deals = hubspotClient.get_deals_from_deal_stage(DealStage.SURVEYED_COMPLETE_NEEDS_SIGN_OFF)
# files missing from assessor column
deals = hubspotClient.get_deals_from_deal_stage(DealStage.NEEDS_ADDITIONAL_INFORMATION_FROM_ASSESSOR)
for deal in deals:
hubspotClient.move_deals_to_different_stage([deal.deal_id], DealStage.SURVEYED_COMPLETED_SIGNED_OFF.value)
# TODO load when we are at 'ready to co-ordination' - script!
# Survyed_complete
deals = hubspotClient.get_deals_from_deal_stage(DealStage.SURVEYED_COMPLETE_NEEDS_SIGN_OFF)
for deal in deals:
hubspotClient.move_deals_to_different_stage([deal.deal_id], DealStage.SURVEYED_COMPLETED_SIGNED_OFF.value)