ShutdownMachineHandler

master
Tudor Stanciu 2022-01-13 13:31:46 +02:00
parent d33d8cf71d
commit 4be57b3ae3
2 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ namespace NetworkResurrector.Api.Application.CommandHandlers
var machine = await _repository.GetMachine(command.MachineId); var machine = await _repository.GetMachine(command.MachineId);
//log activity //log activity
var pingResult = await _resurrectorService.sh(machine.IPv4Address ?? machine.MachineName); var pingResult = await _resurrectorService.Shutdown(machine.IPv4Address ?? machine.MachineName);
var result = new MachineShutdown(pingResult.Success, pingResult.Status); var result = new MachineShutdown(pingResult.Success, pingResult.Status);
_logger.LogDebug($"Machine {command.MachineId} shutdown finished. Success: {result.Success}; Status: {result.Status}"); _logger.LogDebug($"Machine {command.MachineId} shutdown finished. Success: {result.Success}; Status: {result.Status}");

View File

@ -11,7 +11,7 @@
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(MicrosoftExtensionsPackageVersion)" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(MicrosoftExtensionsPackageVersion)" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="$(MicrosoftExtensionsPackageVersion)" /> <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="$(MicrosoftExtensionsPackageVersion)" />
<PackageReference Include="NDB.Application.DataContracts" Version="$(NDBApplicationPackageVersion)" /> <PackageReference Include="NDB.Application.DataContracts" Version="$(NDBApplicationPackageVersion)" />
<PackageReference Include="NetworkResurrector.Server.Wrapper" Version="1.0.3.1" /> <PackageReference Include="NetworkResurrector.Server.Wrapper" Version="1.0.3.2" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>