Implemented server killing. Updated server manage ui. Added latest tailwind stuff. Added internal error handling
This commit is contained in:
@@ -9,15 +9,23 @@ public partial class Server
|
||||
|
||||
private async Task InternalStart()
|
||||
{
|
||||
await ReCreate();
|
||||
try
|
||||
{
|
||||
await ReCreate();
|
||||
|
||||
await LogToConsole("Starting container");
|
||||
await LogToConsole("Starting container");
|
||||
|
||||
// We can disable the null check for the runtime container id, as we set it by calling ReCreate();
|
||||
await AttachConsole(RuntimeContainerId!);
|
||||
|
||||
// Start container
|
||||
var dockerClient = ServiceProvider.GetRequiredService<DockerClient>();
|
||||
await dockerClient.Containers.StartContainerAsync(RuntimeContainerId, new());
|
||||
// We can disable the null check for the runtime container id, as we set it by calling ReCreate();
|
||||
await AttachConsole(RuntimeContainerId!);
|
||||
|
||||
// Start container
|
||||
var dockerClient = ServiceProvider.GetRequiredService<DockerClient>();
|
||||
await dockerClient.Containers.StartContainerAsync(RuntimeContainerId, new());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.LogError("An error occured while performing start trigger: {e}", e);
|
||||
await StateMachine.FireAsync(ServerTrigger.NotifyInternalError);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user