diff --git a/proxy/service.py b/proxy/service.py index 7ad3bc9..c69b467 100644 --- a/proxy/service.py +++ b/proxy/service.py @@ -1164,7 +1164,11 @@ def set_deployment_schedule(deployment_id: str, status: str) -> None: del schedule["updated"] del schedule["deployment_id"] schedule["active"] = status == "active" - prefect_patch(f"deployments/{deployment_id}", {"schedules": [schedule]}) + + prefect_patch( + f"deployments/{deployment_id}", + {"schedules": [schedule], "paused": status == "inactive"}, + ) return None diff --git a/tests/test_service.py b/tests/test_service.py index b762621..106a906 100644 --- a/tests/test_service.py +++ b/tests/test_service.py @@ -1518,7 +1518,7 @@ def test_set_deployment_schedule_result_1(): set_deployment_schedule(deployment_id, "active") mock_patch.assert_called_once_with( f"deployments/{deployment_id}", - {"schedules": [{"schedule": {"cron": "0 0 * * *"}, "active": True}]}, + {"schedules": [{"schedule": {"cron": "0 0 * * *"}, "active": True}], "paused": False}, ) @@ -1542,7 +1542,7 @@ def test_set_deployment_schedule_result_2(): set_deployment_schedule(deployment_id, "inactive") mock_patch.assert_called_once_with( f"deployments/{deployment_id}", - {"schedules": [{"schedule": {"cron": "0 0 * * *"}, "active": False}]}, + {"schedules": [{"schedule": {"cron": "0 0 * * *"}, "active": False}], "paused": True}, ) diff --git a/uv.lock b/uv.lock index 30d47e4..af02612 100644 --- a/uv.lock +++ b/uv.lock @@ -2015,8 +2015,8 @@ wheels = [ [[package]] name = "prefect-airbyte" -version = "0.4" -source = { git = "https://github.com/Ishankoradia/prefect-airbyte.git?rev=v0.4#6b0fa81e8f38890097de0cac0cfd7ce0f144e280" } +version = "0.5" +source = { git = "https://github.com/Ishankoradia/prefect-airbyte.git?rev=v0.5#14bd1d0978c728c8364ed72150cecf61396f44b8" } dependencies = [ { name = "prefect" }, { name = "tenacity" }, @@ -2362,7 +2362,7 @@ requires-dist = [ { name = "pluggy", specifier = "==1.5.0" }, { name = "pre-commit", specifier = "==4.2.0" }, { name = "prefect", specifier = "==3.1.15" }, - { name = "prefect-airbyte", git = "https://github.com/Ishankoradia/prefect-airbyte.git?rev=v0.4" }, + { name = "prefect-airbyte", git = "https://github.com/Ishankoradia/prefect-airbyte.git?rev=v0.5" }, { name = "prefect-dbt", specifier = "==0.6.6" }, { name = "prefect-gcp", specifier = "==0.6.4" }, { name = "prefect-github", specifier = "==0.3.1" },