是否可以从 Durable Function Orchestrator 中的私有方法调用活动函数,或者应该避免这样做?这是一个例子:
[FunctionName(nameof(OrchFunc))]
public async Task OrchFunc(
[OrchestrationTrigger] DurableOrchestrationContext context,
ILogger logger) {
var myParameter = context.GetInput<string>();
// Any issue with doing this with the way checkpoints work?
var result = await MyPrivateFunc(context, myProperty);
}
private async Task<bool> MyPrivateFunc(
DurableOrchestrationContext context,
string myParameter) {
return result = await context.CallActivityAsync<bool>(nameof(MyActivityFunc), myParameter);
}
请记住,这是一个澄清问题的简单示例。我已经知道它可以直接从编排函数调用,从而跳过私有函数。我并不是想看看它是否有意义,而是只是想了解是否会产生意想不到的副作用。
回首忆惘然
相关分类