Skip to content

Commit 1652304

Browse files
authored
Move scale_out_facade next to scale_out (#3550)
See PR #3530 which does this for status() This is a buildup to some simplification and eventual merge of scale_out and scale_out_facade in upcoming PRs. This PR should not change any behaviour
1 parent b96a2dd commit 1652304

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

parsl/executors/status_handling.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,16 @@ def _filter_scale_in_ids(self, to_kill, killed):
174174
# Filters first iterable by bool values in second
175175
return list(compress(to_kill, killed))
176176

177+
def scale_out_facade(self, n: int) -> List[str]:
178+
block_ids = self._scale_out(n)
179+
if block_ids is not None:
180+
new_status = {}
181+
for block_id in block_ids:
182+
new_status[block_id] = JobStatus(JobState.PENDING)
183+
self.send_monitoring_info(new_status)
184+
self._status.update(new_status)
185+
return block_ids
186+
177187
def _scale_out(self, blocks: int = 1) -> List[str]:
178188
"""Scales out the number of blocks by "blocks"
179189
"""
@@ -327,13 +337,3 @@ def scale_in_facade(self, n: int, max_idletime: Optional[float] = None) -> List[
327337
del self._status[block_id]
328338
self.send_monitoring_info(new_status)
329339
return block_ids
330-
331-
def scale_out_facade(self, n: int) -> List[str]:
332-
block_ids = self._scale_out(n)
333-
if block_ids is not None:
334-
new_status = {}
335-
for block_id in block_ids:
336-
new_status[block_id] = JobStatus(JobState.PENDING)
337-
self.send_monitoring_info(new_status)
338-
self._status.update(new_status)
339-
return block_ids

0 commit comments

Comments
 (0)