public async Task <Unit> Handle(ResolveOutageCommand request, CancellationToken cancellationToken) { Logger.LogInformation($"[OutageLifecycleCommandHandler::IsolateOutageCommand] Sending isolate outage command for outage: {request.OutageId}"); try { var resolveOutageClient = OutageResolutionClient.CreateClient(); await resolveOutageClient.ResolveOutage(request.OutageId); } catch (Exception ex) { Logger.LogError("[OutageLifecycleCommandHandler::IsolateOutageCommand] OutageLifecycleCommandHandler failed on IsolateOutage handler.", ex); throw; } return(new Unit()); }
public async Task <Unit> Handle(ValidateResolveConditionsCommand request, CancellationToken cancellationToken) { Logger.LogInformation($"[OutageLifecycleCommandHandler::ValidateResolveConditionsCommand] Sending validate resolve conditions command for outage: {request.OutageId}"); try { var validateResolveConditionsClient = OutageResolutionClient.CreateClient(); await validateResolveConditionsClient.ValidateResolveConditions(request.OutageId); } catch (Exception ex) { Logger.LogError("[OutageLifecycleCommandHandler::ValidateResolveConditionsCommand] OutageLifecycleCommandHandler failed on ValidateResolveConditions handler.", ex); throw; } return(new Unit()); }