diff --git a/appveyor.yml b/appveyor.yml
index ebfe1041dc..98c9cb64f1 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -41,6 +41,8 @@ test_script:
- ps: $wc = New-Object 'System.Net.WebClient'
- ps: $wc.UploadFile("https://ci.appveyor.com/api/testresults/mstest/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\TestResults\results.trx))
- vstest.console /logger:trx;LogFileName=results.trx "tests\Tgstation.Server.Host.Tests\bin\%CONFIGURATION%\netcoreapp2.0\Tgstation.Server.Host.Tests.dll" /Enablecodecoverage /inIsolation /Platform:x64
+ - ps: $wc = New-Object 'System.Net.WebClient'
+ - ps: $wc.UploadFile("https://ci.appveyor.com/api/testresults/mstest/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\TestResults\results.trx))
- vstest.console /logger:trx;LogFileName=results.trx "tests\Tgstation.Server.Host.Console.Tests\bin\%CONFIGURATION%\netcoreapp2.0\Tgstation.Server.Host.Console.Tests.dll" /Enablecodecoverage /inIsolation /Platform:x64
- ps: $wc = New-Object 'System.Net.WebClient'
- ps: $wc.UploadFile("https://ci.appveyor.com/api/testresults/mstest/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\TestResults\results.trx))
diff --git a/src/Tgstation.Server.Api/Models/Internal/DreamDaemonLaunchParameters.cs b/src/Tgstation.Server.Api/Models/Internal/DreamDaemonLaunchParameters.cs
index 8602b302b5..62e0f7eb87 100644
--- a/src/Tgstation.Server.Api/Models/Internal/DreamDaemonLaunchParameters.cs
+++ b/src/Tgstation.Server.Api/Models/Internal/DreamDaemonLaunchParameters.cs
@@ -1,4 +1,5 @@
-using Tgstation.Server.Api.Rights;
+using System.ComponentModel.DataAnnotations;
+using Tgstation.Server.Api.Rights;
namespace Tgstation.Server.Api.Models.Internal
{
@@ -12,24 +13,28 @@ namespace Tgstation.Server.Api.Models.Internal
/// If the BYOND web client can be used to connect to the game server
///
[Permissions(ReadRight = DreamDaemonRights.ReadMetadata, WriteRight = DreamDaemonRights.SetWebClient)]
- public bool AllowWebClient { get; set; }
+ [Required]
+ public bool? AllowWebClient { get; set; }
///
/// The level of
///
[Permissions(ReadRight = DreamDaemonRights.ReadMetadata, WriteRight = DreamDaemonRights.SetSecurity)]
- public DreamDaemonSecurity SecurityLevel { get; set; }
+ [Required]
+ public DreamDaemonSecurity? SecurityLevel { get; set; }
///
/// The first port uses. This should be the publically advertised port
///
[Permissions(ReadRight = DreamDaemonRights.ReadMetadata, WriteRight = DreamDaemonRights.SetPorts)]
- public ushort PrimaryPort { get; set; }
+ [Required]
+ public ushort? PrimaryPort { get; set; }
///
/// The second port uses
///
[Permissions(ReadRight = DreamDaemonRights.ReadMetadata, WriteRight = DreamDaemonRights.SetPorts)]
- public ushort SecondaryPort { get; set; }
+ [Required]
+ public ushort? SecondaryPort { get; set; }
}
}
\ No newline at end of file
diff --git a/src/Tgstation.Server.Api/Models/Internal/DreamDaemonSettings.cs b/src/Tgstation.Server.Api/Models/Internal/DreamDaemonSettings.cs
index b4fd279881..72260ee5fc 100644
--- a/src/Tgstation.Server.Api/Models/Internal/DreamDaemonSettings.cs
+++ b/src/Tgstation.Server.Api/Models/Internal/DreamDaemonSettings.cs
@@ -1,4 +1,5 @@
-using Tgstation.Server.Api.Rights;
+using System.ComponentModel.DataAnnotations;
+using Tgstation.Server.Api.Rights;
namespace Tgstation.Server.Api.Models.Internal
{
@@ -11,18 +12,21 @@ namespace Tgstation.Server.Api.Models.Internal
/// If starts when it's starts
///
[Permissions(ReadRight = DreamDaemonRights.ReadMetadata, WriteRight = DreamDaemonRights.SetAutoStart)]
- public bool AutoStart { get; set; }
+ [Required]
+ public bool? AutoStart { get; set; }
///
/// If the server is undergoing a soft reset. This may be automatically set by changes to other fields
///
[Permissions(ReadRight = DreamDaemonRights.ReadMetadata, WriteRight = DreamDaemonRights.SoftRestart)]
- public bool SoftRestart { get; set; }
+ [Required]
+ public bool? SoftRestart { get; set; }
///
/// If the server is undergoing a soft shutdown
///
[Permissions(ReadRight = DreamDaemonRights.ReadMetadata, WriteRight = DreamDaemonRights.SoftShutdown)]
- public bool SoftShutdown { get; set; }
+ [Required]
+ public bool? SoftShutdown { get; set; }
}
}
diff --git a/src/Tgstation.Server.Host/Components/DreamDaemon.cs b/src/Tgstation.Server.Host/Components/DreamDaemon.cs
index 1d6846ccb3..f699150079 100644
--- a/src/Tgstation.Server.Host/Components/DreamDaemon.cs
+++ b/src/Tgstation.Server.Host/Components/DreamDaemon.cs
@@ -27,6 +27,12 @@ namespace Tgstation.Server.Host.Components
///
public bool SoftStopping { get; private set; }
+ ///
+ public DreamDaemonLaunchParameters LastLaunchParameters { get; private set; }
+
+ ///
+ public Host.Models.CompileJob LastCompileJob => watchdog.CurrentCompileJob;
+
///
/// The for
///
@@ -69,7 +75,7 @@ namespace Tgstation.Server.Host.Components
this.watchdog = watchdog ?? throw new ArgumentNullException(nameof(watchdog));
currentLaunchParameters = initialSettings ?? throw new ArgumentNullException(nameof(initialSettings));
- autoStart = initialSettings.AutoStart;
+ autoStart = initialSettings.AutoStart.Value;
semaphore = new SemaphoreSlim(1);
}
@@ -198,6 +204,7 @@ namespace Tgstation.Server.Host.Components
await semaphore.WaitAsync(cancellationToken).ConfigureAwait(false);
try
{
+ LastLaunchParameters = currentLaunchParameters;
return currentLaunchParameters;
}
finally
diff --git a/src/Tgstation.Server.Host/Components/DreamDaemonExecutor.cs b/src/Tgstation.Server.Host/Components/DreamDaemonExecutor.cs
index 0f3a47b026..3a54783935 100644
--- a/src/Tgstation.Server.Host/Components/DreamDaemonExecutor.cs
+++ b/src/Tgstation.Server.Host/Components/DreamDaemonExecutor.cs
@@ -56,7 +56,7 @@ namespace Tgstation.Server.Host.Components
}
///
- public async Task RunDreamDaemon(DreamDaemonLaunchParameters launchParameters, TaskCompletionSource