public async Task Run([OrchestrationTrigger] IDurableOrchestrationContext context) { var input = context.GetInput <Input>(); var circuitBreakerOptions = new CircuitBreakerOptions() { CircuitBreakerId = input.CircuitBreakerId, }; await context.ExecuteActivityWithCircuitBreaker(ThrottlingActivity.FunctionName, circuitBreakerOptions, null); }
public static Task ExecuteActivityWithCircuitBreaker(this IDurableOrchestrationContext context, string functionName, CircuitBreakerOptions circuitBreakerOptions, object input) { return(ExecuteActivityWithCircuitBreaker <object>(context, functionName, circuitBreakerOptions, input)); }
public static Task <T> ExecuteActivityWithCircuitBreaker <T>(this IDurableOrchestrationContext context, string functionName, CircuitBreakerOptions circuitBreakerOptions, object input) { SubOrchestrator.Input subOrchestratorInput = new SubOrchestrator.Input() { ActivityFunctionName = functionName, ActivityFunctionInput = input, CircuitBreakerOptions = circuitBreakerOptions, }; return(context.CallSubOrchestratorAsync <T>(SubOrchestrator.FunctionName, subOrchestratorInput)); }