File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 23
23
from orchestrator .targets import Target
24
24
from orchestrator .types import SubscriptionLifecycle
25
25
from orchestrator .utils .json import to_serializable
26
+ from orchestrator .websocket import sync_invalidate_subscription_cache
26
27
from orchestrator .workflow import Step , step
27
28
from pydantic_forms .types import State , UUIDstr
28
29
33
34
def resync (subscription : SubscriptionModel ) -> State :
34
35
"""Transition a subscription to in sync."""
35
36
subscription .insync = True
37
+ sync_invalidate_subscription_cache (subscription .subscription_id )
36
38
return {"subscription" : subscription }
37
39
38
40
@@ -93,6 +95,7 @@ def unsync(subscription_id: UUIDstr, __old_subscriptions__: dict | None = None)
93
95
if not subscription .insync :
94
96
raise ValueError ("Subscription is already out of sync, cannot continue!" )
95
97
subscription .insync = False
98
+ sync_invalidate_subscription_cache (subscription .subscription_id )
96
99
97
100
return {"subscription" : subscription , "__old_subscriptions__" : subscription_backup }
98
101
You can’t perform that action at this time.
0 commit comments