Skip to content

Commit 2970313

Browse files
committed
move two scale out methods next to each other for easier visual inspection
behaviour changes: none
1 parent 201bc03 commit 2970313

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
@@ -178,6 +178,16 @@ def _filter_scale_in_ids(self, to_kill: Sequence[Any], killed: Sequence[bool]) -
178178
# Filters first iterable by bool values in second
179179
return list(compress(to_kill, killed))
180180

181+
def scale_out_facade(self, n: int) -> List[str]:
182+
block_ids = self._scale_out(n)
183+
if block_ids is not None:
184+
new_status = {}
185+
for block_id in block_ids:
186+
new_status[block_id] = JobStatus(JobState.PENDING)
187+
self.send_monitoring_info(new_status)
188+
self._status.update(new_status)
189+
return block_ids
190+
181191
def _scale_out(self, blocks: int = 1) -> List[str]:
182192
"""Scales out the number of blocks by "blocks"
183193
"""
@@ -335,13 +345,3 @@ def scale_in_facade(self, n: int, max_idletime: Optional[float] = None) -> List[
335345
del self._status[block_id]
336346
self.send_monitoring_info(new_status)
337347
return block_ids
338-
339-
def scale_out_facade(self, n: int) -> List[str]:
340-
block_ids = self._scale_out(n)
341-
if block_ids is not None:
342-
new_status = {}
343-
for block_id in block_ids:
344-
new_status[block_id] = JobStatus(JobState.PENDING)
345-
self.send_monitoring_info(new_status)
346-
self._status.update(new_status)
347-
return block_ids

0 commit comments

Comments
 (0)