From 357ff3f8448776ae06895600394f8b52b8340a0c Mon Sep 17 00:00:00 2001 From: Maxime Armstrong Date: Fri, 15 Nov 2024 09:44:34 -0500 Subject: [PATCH] Assert connector syncable before updating schedule --- .../dagster-fivetran/dagster_fivetran/resources.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python_modules/libraries/dagster-fivetran/dagster_fivetran/resources.py b/python_modules/libraries/dagster-fivetran/dagster_fivetran/resources.py index 5e553783c78f8..e8e24045cb3a3 100644 --- a/python_modules/libraries/dagster-fivetran/dagster_fivetran/resources.py +++ b/python_modules/libraries/dagster-fivetran/dagster_fivetran/resources.py @@ -654,13 +654,13 @@ def start_resync( self._start_sync(request_fn=request_fn, connector_id=connector_id) def _start_sync(self, request_fn: Callable, connector_id: str) -> None: - if self.disable_schedule_on_trigger: - self._log.info("Disabling Fivetran sync schedule.") - self.update_schedule_type_for_connector(connector_id, "manual") connector = FivetranConnector.from_connector_details( connector_details=self.get_connector_details(connector_id) ) connector.assert_syncable() + if self.disable_schedule_on_trigger: + self._log.info("Disabling Fivetran sync schedule.") + self.update_schedule_type_for_connector(connector_id, "manual") request_fn() self._log.info( f"Sync initialized for connector_id={connector_id}. View this sync in the Fivetran"