@@ -158,6 +158,28 @@ async def _get_step_error_traceback(
158158 return step_name , await step_proxy .get ("error_traceback" )
159159
160160
161+ async def _get_group_step_proxies (
162+ store : Store ,
163+ * ,
164+ schedule_id : ScheduleId ,
165+ operation_name : OperationName ,
166+ group_index : NonNegativeInt ,
167+ step_group : BaseStepGroup ,
168+ is_creating : bool ,
169+ ) -> dict [StepName , StepStoreProxy ]:
170+ return {
171+ step .get_step_name (): StepStoreProxy (
172+ store = store ,
173+ schedule_id = schedule_id ,
174+ operation_name = operation_name ,
175+ step_group_name = step_group .get_step_group_name (index = group_index ),
176+ step_name = step .get_step_name (),
177+ is_creating = is_creating ,
178+ )
179+ for step in step_group .get_step_subgroup_to_run ()
180+ }
181+
182+
161183class Core :
162184 def __init__ (
163185 self ,
@@ -287,27 +309,6 @@ async def cancel_schedule(self, schedule_id: ScheduleId) -> None:
287309 await DeferredRunner .cancel (deferred_task_uid )
288310 await step_proxy .set ("status" , StepStatus .CANCELLED )
289311
290- async def _get_group_step_proxies (
291- self ,
292- * ,
293- schedule_id : ScheduleId ,
294- operation_name : OperationName ,
295- group_index : NonNegativeInt ,
296- step_group : BaseStepGroup ,
297- is_creating : bool ,
298- ) -> dict [StepName , StepStoreProxy ]:
299- return {
300- step .get_step_name (): StepStoreProxy (
301- store = self ._store ,
302- schedule_id = schedule_id ,
303- operation_name = operation_name ,
304- step_group_name = step_group .get_step_group_name (index = group_index ),
305- step_name = step .get_step_name (),
306- is_creating = is_creating ,
307- )
308- for step in step_group .get_step_subgroup_to_run ()
309- }
310-
311312 async def _on_schedule_event (self , schedule_id : ScheduleId ) -> None :
312313 schedule_data_proxy = ScheduleDataStoreProxy (
313314 store = self ._store , schedule_id = schedule_id
@@ -320,7 +321,8 @@ async def _on_schedule_event(self, schedule_id: ScheduleId) -> None:
320321 operation = OperationRegistry .get_operation (operation_name )
321322 step_group = operation [group_index ]
322323
323- group_step_proxies = await self ._get_group_step_proxies (
324+ group_step_proxies = await _get_group_step_proxies (
325+ self ._store ,
324326 schedule_id = schedule_id ,
325327 operation_name = operation_name ,
326328 group_index = group_index ,
0 commit comments