File tree Expand file tree Collapse file tree 4 files changed +6
-10
lines changed Expand file tree Collapse file tree 4 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -38,9 +38,7 @@ def reconfigure(
3838 with Dao (db_engine , commit_on_exit = True ) as dao :
3939 deployment = DeploymentModel .from_stale_hosted_entities (
4040 collections = collections ,
41- stale_hosted_entity_statuses = dao .get_hosted_entity_statuses (
42- filter_stale = True
43- ),
41+ hosted_entity_statuses = dao .get_hosted_entity_statuses (filter_stale = True ),
4442 rolling_interval = rolling_interval ,
4543 )
4644 if preview :
Original file line number Diff line number Diff line change @@ -103,9 +103,7 @@ def __init__(
103103 self ._reconfigure_operations = _group_hosts_by_operation (
104104 DeploymentModel .from_stale_hosted_entities (
105105 collections = self ._collections ,
106- stale_hosted_entity_statuses = [
107- status for status in cluster_status .values () if status .is_stale
108- ],
106+ hosted_entity_statuses = list (cluster_status .values ()),
109107 )
110108 )
111109 except NothingToReconfigureError :
Original file line number Diff line number Diff line change @@ -329,21 +329,21 @@ def from_operations_hosts_vars(
329329 @staticmethod
330330 def from_stale_hosted_entities (
331331 collections : Collections ,
332- stale_hosted_entity_statuses : list [HostedEntityStatus ],
332+ hosted_entity_statuses : list [HostedEntityStatus ],
333333 rolling_interval : Optional [int ] = None ,
334334 ) -> DeploymentModel :
335335 """Generate a deployment plan for stale components.
336336
337337 Args:
338338 collections: Collections to retrieve the operations from.
339- stale_hosted_entity_statuses : List of stale hosted entity statuses.
339+ hosted_entity_statuses : List of hosted entity statuses.
340340 rolling_interval: Number of seconds to wait between component restart.
341341
342342 Raises:
343343 NothingToReconfigureError: If no component needs to be reconfigured.
344344 """
345345 operation_hosts : set [OperationHostTuple ] = set ()
346- for status in stale_hosted_entity_statuses :
346+ for status in hosted_entity_statuses :
347347 if status .to_config :
348348 operation_hosts .add (
349349 OperationHostTuple (
Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ def plan_reconfigure(
200200 # return the deployment plan (it is neither persisted in the database nor executed)
201201 return DeploymentModel .from_stale_hosted_entities (
202202 collections = collections ,
203- stale_hosted_entity_statuses = dao .get_hosted_entity_statuses (filter_stale = True ),
203+ hosted_entity_statuses = dao .get_hosted_entity_statuses (filter_stale = True ),
204204 )
205205
206206
You can’t perform that action at this time.
0 commit comments