@@ -179,22 +179,13 @@ def _filter_scale_in_ids(self, to_kill: Sequence[Any], killed: Sequence[bool]) -
179179 return list (compress (to_kill , killed ))
180180
181181 def scale_out_facade (self , n : int ) -> List [str ]:
182- block_ids = self ._scale_out (n )
183- new_status = {}
184- for block_id in block_ids :
185- new_status [block_id ] = JobStatus (JobState .PENDING )
186- self .send_monitoring_info (new_status )
187- self ._status .update (new_status )
188- return block_ids
189-
190- def _scale_out (self , blocks : int = 1 ) -> List [str ]:
191182 """Scales out the number of blocks by "blocks"
192183 """
193184 if not self .provider :
194185 raise ScalingFailed (self , "No execution provider available" )
195186 block_ids = []
196- logger .info (f"Scaling out by { blocks } blocks" )
197- for _ in range (blocks ):
187+ logger .info (f"Scaling out by { n } blocks" )
188+ for _ in range (n ):
198189 block_id = str (self ._block_id_counter .get_id ())
199190 logger .info (f"Allocated block ID { block_id } " )
200191 try :
@@ -204,6 +195,12 @@ def _scale_out(self, blocks: int = 1) -> List[str]:
204195 block_ids .append (block_id )
205196 except Exception as ex :
206197 self ._simulated_status [block_id ] = JobStatus (JobState .FAILED , "Failed to start block {}: {}" .format (block_id , ex ))
198+
199+ new_status = {}
200+ for block_id in block_ids :
201+ new_status [block_id ] = JobStatus (JobState .PENDING )
202+ self .send_monitoring_info (new_status )
203+ self ._status .update (new_status )
207204 return block_ids
208205
209206 def scale_in (self , blocks : int ) -> List [str ]:
0 commit comments