Skip to content

Commit 2ce5854

Browse files
committed
Rename _add_bounds_tracker_add_system_bounds_tracker
This makes the function easier to distinguish from per-priority bounds produced by the power manager. Signed-off-by: Sahas Subramanian <[email protected]>
1 parent fc4bdf9 commit 2ce5854

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/frequenz/sdk/microgrid/_power_managing/_power_managing_actor.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ async def _bounds_tracker(
126126
await self._send_updated_target_power(component_ids, None)
127127
await self._send_reports(component_ids)
128128

129-
def _add_bounds_tracker(self, component_ids: frozenset[int]) -> None:
130-
"""Add a bounds tracker.
129+
def _add_system_bounds_tracker(self, component_ids: frozenset[int]) -> None:
130+
"""Add a system bounds tracker for the given components.
131131
132132
Args:
133133
component_ids: The component IDs for which to add a bounds tracker.
@@ -210,7 +210,7 @@ async def _run(self) -> None:
210210
if selected_from(selected, self._proposals_receiver):
211211
proposal = selected.message
212212
if proposal.component_ids not in self._bound_tracker_tasks:
213-
self._add_bounds_tracker(proposal.component_ids)
213+
self._add_system_bounds_tracker(proposal.component_ids)
214214

215215
# TODO: must_send=True forces a new request to # pylint: disable=fixme
216216
# be sent to the PowerDistributor, even if there's no change in power.
@@ -245,7 +245,7 @@ async def _run(self) -> None:
245245
)
246246

247247
if sub.component_ids not in self._bound_tracker_tasks:
248-
self._add_bounds_tracker(sub.component_ids)
248+
self._add_system_bounds_tracker(sub.component_ids)
249249

250250
elif selected_from(selected, self._power_distributing_results_receiver):
251251
result = selected.message

0 commit comments

Comments
 (0)