in azure/durable_functions/models/DurableOrchestrationContext.py [0:0]
def _add_to_actions(self, action_repr: Union[List[Action], Action]):
"""Add a Task's actions payload to the context's actions array.
Parameters
----------
action_repr : Union[List[Action], Action]
The tasks to add
"""
# Do not add further actions after `continue_as_new` has been
# called
if self.will_continue_as_new:
return
if self._replay_schema is ReplaySchema.V1 and isinstance(action_repr, list):
self._action_payload_v1.append(action_repr)
elif (self._replay_schema.value >= ReplaySchema.V2.value
and isinstance(action_repr, Action)):
self._action_payload_v2.append(action_repr)
else:
raise Exception(f"DF-internal exception: ActionRepr of signature {type(action_repr)}"
f"is not compatible on ReplaySchema {self._replay_schema.name}. ")