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(
38
38
with Dao (db_engine , commit_on_exit = True ) as dao :
39
39
deployment = DeploymentModel .from_stale_hosted_entities (
40
40
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 ),
44
42
rolling_interval = rolling_interval ,
45
43
)
46
44
if preview :
Original file line number Diff line number Diff line change @@ -103,9 +103,7 @@ def __init__(
103
103
self ._reconfigure_operations = _group_hosts_by_operation (
104
104
DeploymentModel .from_stale_hosted_entities (
105
105
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 ()),
109
107
)
110
108
)
111
109
except NothingToReconfigureError :
Original file line number Diff line number Diff line change @@ -329,21 +329,21 @@ def from_operations_hosts_vars(
329
329
@staticmethod
330
330
def from_stale_hosted_entities (
331
331
collections : Collections ,
332
- stale_hosted_entity_statuses : list [HostedEntityStatus ],
332
+ hosted_entity_statuses : list [HostedEntityStatus ],
333
333
rolling_interval : Optional [int ] = None ,
334
334
) -> DeploymentModel :
335
335
"""Generate a deployment plan for stale components.
336
336
337
337
Args:
338
338
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.
340
340
rolling_interval: Number of seconds to wait between component restart.
341
341
342
342
Raises:
343
343
NothingToReconfigureError: If no component needs to be reconfigured.
344
344
"""
345
345
operation_hosts : set [OperationHostTuple ] = set ()
346
- for status in stale_hosted_entity_statuses :
346
+ for status in hosted_entity_statuses :
347
347
if status .to_config :
348
348
operation_hosts .add (
349
349
OperationHostTuple (
Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ def plan_reconfigure(
200
200
# return the deployment plan (it is neither persisted in the database nor executed)
201
201
return DeploymentModel .from_stale_hosted_entities (
202
202
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 ),
204
204
)
205
205
206
206
You can’t perform that action at this time.
0 commit comments