Skip to content

Commit

Permalink
RPS-1174, dont deactivate motion groups
Browse files Browse the repository at this point in the history
  • Loading branch information
mahsumdemirwb committed Feb 3, 2025
1 parent a8e2bb4 commit 87d8db6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions nova/core/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ async def __aenter__(self):

@final
async def __aexit__(self, exc_type, exc_val, exc_tb):
for motion_group_id in self._activated_motion_group_ids:
logger.info(f"Deactivating motion group {motion_group_id}")
await self._motion_group_api.deactivate_motion_group(self._cell, motion_group_id)
# RPS-1174: when a motion group is deactivated, RAE closes all open connections
# this behaviour is not desired in some cases,
# so for now we will not deactivate for the user
pass

def __len__(self) -> int:
return len(self._activated_motion_group_ids)
Expand Down
7 changes: 4 additions & 3 deletions nova/core/motion_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ async def __aenter__(self):
return self

async def __aexit__(self, exc_type, exc_val, exc_tb):
await self._api_gateway.motion_group_api.deactivate_motion_group(
cell=self._cell, motion_group=self._motion_group_id
)
# RPS-1174: when a motion group is deactivated, RAE closes all open connections
# this behaviour is not desired in some cases,
# so for now we will not deactivate for the user
pass

@property
def motion_group_id(self) -> str:
Expand Down

0 comments on commit 87d8db6

Please sign in to comment.