Skip to content

Commit cd55f8e

Browse files
authored
Merge branch 'dev' into anatolib/context-version
2 parents f71b40e + c957019 commit cd55f8e

File tree

1 file changed

+9
-16
lines changed

1 file changed

+9
-16
lines changed

azure/durable_functions/models/DurableOrchestrationContext.py

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -602,22 +602,15 @@ def create_timer(self, fire_at: datetime.datetime) -> TaskBase:
602602
TaskBase
603603
A Durable Timer Task that schedules the timer to wake up the activity
604604
"""
605-
if self._replay_schema.value >= ReplaySchema.V3.value:
606-
if not self._maximum_short_timer_duration or not self._long_timer_interval_duration:
607-
raise Exception(
608-
"A framework-internal error was detected: "
609-
"replay schema version >= V3 is being used, "
610-
"but one or more of the properties `maximumShortTimerDuration`"
611-
"and `longRunningTimerIntervalDuration` are not defined. "
612-
"This is likely an issue with the Durable Functions Extension. "
613-
"Please report this bug here: "
614-
"https://github.com/Azure/azure-functions-durable-python/issues\n"
615-
f"maximumShortTimerDuration: {self._maximum_short_timer_duration}\n"
616-
f"longRunningTimerIntervalDuration: {self._long_timer_interval_duration}"
617-
)
618-
if fire_at > self.current_utc_datetime + self._maximum_short_timer_duration:
619-
action = CreateTimerAction(fire_at)
620-
return LongTimerTask(None, action, self)
605+
if (self._replay_schema.value >= ReplaySchema.V3.value
606+
and self._maximum_short_timer_duration
607+
and self._long_timer_interval_duration
608+
and fire_at > self.current_utc_datetime + self._maximum_short_timer_duration):
609+
# Timer duration config values are not provided for DTS or MSSQL, so skip the
610+
# LongTimerTask and create the TimerTask as normal
611+
612+
action = CreateTimerAction(fire_at)
613+
return LongTimerTask(None, action, self)
621614

622615
action = CreateTimerAction(fire_at)
623616
task = self._generate_task(action, task_constructor=TimerTask)

0 commit comments

Comments
 (0)