@@ -189,22 +189,13 @@ def _filter_scale_in_ids(self, to_kill: Sequence[Any], killed: Sequence[bool]) -
189189 return list (compress (to_kill , killed ))
190190
191191 def scale_out_facade (self , n : int ) -> List [str ]:
192- block_ids = self ._scale_out (n )
193- new_status = {}
194- for block_id in block_ids :
195- new_status [block_id ] = JobStatus (JobState .PENDING )
196- self .send_monitoring_info (new_status )
197- self ._status .update (new_status )
198- return block_ids
199-
200- def _scale_out (self , blocks : int = 1 ) -> List [str ]:
201192 """Scales out the number of blocks by "blocks"
202193 """
203194 if not self .provider :
204195 raise ScalingFailed (self , "No execution provider available" )
205196 block_ids = []
206- logger .info (f"Scaling out by { blocks } blocks" )
207- for _ in range (blocks ):
197+ logger .info (f"Scaling out by { n } blocks" )
198+ for _ in range (n ):
208199 block_id = str (self ._block_id_counter .get_id ())
209200 logger .info (f"Allocated block ID { block_id } " )
210201 try :
@@ -214,6 +205,12 @@ def _scale_out(self, blocks: int = 1) -> List[str]:
214205 block_ids .append (block_id )
215206 except Exception as ex :
216207 self ._simulated_status [block_id ] = JobStatus (JobState .FAILED , "Failed to start block {}: {}" .format (block_id , ex ))
208+
209+ new_status = {}
210+ for block_id in block_ids :
211+ new_status [block_id ] = JobStatus (JobState .PENDING )
212+ self .send_monitoring_info (new_status )
213+ self ._status .update (new_status )
217214 return block_ids
218215
219216 def scale_in (self , blocks : int ) -> List [str ]:
0 commit comments