Skip to content

Commit d0e5926

Browse files
committed
Also fix task_any scheduling issue
1 parent 8ca7dc4 commit d0e5926

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

azure/durable_functions/models/TaskOrchestrationExecutor.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,14 +245,14 @@ def resume_user_code(self):
245245

246246
self.current_task = new_task
247247
if not (new_task is None):
248+
if not (self.current_task._is_scheduled):
249+
# new task is received. it needs to be resolved to a value
250+
self.context._add_to_actions(self.current_task.action_repr)
251+
self._mark_as_scheduled(self.current_task)
248252
if not (new_task.state is TaskState.RUNNING):
249253
# user yielded the same task multiple times, continue executing code
250254
# until a new/not-previously-yielded task is encountered
251255
self.resume_user_code()
252-
elif not (self.current_task._is_scheduled):
253-
# new task is received. it needs to be resolved to a value
254-
self.context._add_to_actions(self.current_task.action_repr)
255-
self._mark_as_scheduled(self.current_task)
256256

257257
def _mark_as_scheduled(self, task: TaskBase):
258258
if isinstance(task, CompoundTask):

0 commit comments

Comments
 (0)