@@ -321,7 +321,7 @@ def try_set_value(self, child: TaskBase):
321321class LongTimerTask (WhenAllTask ):
322322 """A Timer Task for intervals longer than supported by the storage backend."""
323323
324- def __init__ (self , id , action : CreateTimerAction , orchestration_context ):
324+ def __init__ (self , id_ , action : CreateTimerAction , orchestration_context ):
325325 """Initialize a LongTimerTask.
326326
327327 Parameters
@@ -337,20 +337,20 @@ def __init__(self, id, action: CreateTimerAction, orchestration_context):
337337 final_fire_time = action .fire_at
338338 duration_until_fire = final_fire_time - current_time
339339
340- if duration_until_fire > orchestration_context .maximum_short_timer_duration :
341- next_fire_time = current_time + orchestration_context .long_timer_interval_duration
340+ if duration_until_fire > orchestration_context ._maximum_short_timer_duration :
341+ next_fire_time = current_time + orchestration_context ._long_timer_interval_duration
342342 else :
343343 next_fire_time = final_fire_time
344344
345345 next_timer_action = CreateTimerAction (next_fire_time )
346346 next_timer_task = TimerTask (None , next_timer_action )
347347 super ().__init__ ([next_timer_task ], orchestration_context ._replay_schema )
348348
349- self .id = id
349+ self .id = id_
350350 self .action = action
351- self .orchestration_context = orchestration_context
352- self .maximum_short_timer_duration = self .orchestration_context . maximum_short_timer_duration
353- self .long_timer_interval_duration = self .orchestration_context . long_timer_interval_duration
351+ self ._orchestration_context = orchestration_context
352+ self ._max_short_timer_duration = self ._orchestration_context . _maximum_short_timer_duration
353+ self ._long_timer_interval = self ._orchestration_context . _long_timer_interval_duration
354354
355355 def is_canceled (self ) -> bool :
356356 """Check if the LongTimer is cancelled.
@@ -385,7 +385,7 @@ def try_set_value(self, child: TimerTask):
385385 child : TimerTask
386386 A timer sub-task that just completed
387387 """
388- current_time = self .orchestration_context .current_utc_datetime
388+ current_time = self ._orchestration_context .current_utc_datetime
389389 final_fire_time = self .action .fire_at
390390 if final_fire_time > current_time :
391391 next_timer = self .get_next_timer_task (final_fire_time , current_time )
@@ -408,8 +408,8 @@ def get_next_timer_task(self, final_fire_time: datetime, current_time: datetime)
408408 A TimerTask representing the next interval of the LongTimer
409409 """
410410 duration_until_fire = final_fire_time - current_time
411- if duration_until_fire > self .maximum_short_timer_duration :
412- next_fire_time = current_time + self .long_timer_interval_duration
411+ if duration_until_fire > self ._max_short_timer_duration :
412+ next_fire_time = current_time + self ._long_timer_interval
413413 else :
414414 next_fire_time = final_fire_time
415415 return TimerTask (None , CreateTimerAction (next_fire_time ))
@@ -426,8 +426,8 @@ def add_new_child(self, child_timer: TimerTask):
426426 """
427427 child_timer .parent = self
428428 self .pending_tasks .add (child_timer )
429- self .orchestration_context ._add_to_open_tasks (child_timer )
430- self .orchestration_context ._add_to_actions (child_timer .action_repr )
429+ self ._orchestration_context ._add_to_open_tasks (child_timer )
430+ self ._orchestration_context ._add_to_actions (child_timer .action_repr )
431431 child_timer ._set_is_scheduled (True )
432432
433433
0 commit comments