Refactor to support batch action invocation
Replaced `InvokeRecAction` with `InvokeBatchRecAction` in `ActionController` to transition from single-action to batch-action invocation. Removed `InvokeRecActionCommand.cs`, which previously handled individual action invocations. Introduced `InvokeBatchRecActionsCommand.cs` to handle batch processing with similar concurrency control logic using a semaphore. This redesign improves scalability and aligns with updated business requirements while maintaining compatibility with the existing application structure.
This commit is contained in:
@@ -11,7 +11,7 @@ public class ActionController(IMediator mediator) : ControllerBase
|
||||
[HttpPost("{profileId}")]
|
||||
public async Task<IActionResult> Invoke([FromRoute] int profileId)
|
||||
{
|
||||
await mediator.InvokeRecAction(profileId);
|
||||
await mediator.InvokeBatchRecAction(profileId);
|
||||
return Accepted();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user