mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-26 22:48:20 +01:00
Cybertweaks
This commit is contained in:
+1
-1
@@ -7,7 +7,7 @@
|
||||
<TgsConfigVersion>2.2.0</TgsConfigVersion>
|
||||
<TgsApiVersion>8.2.0</TgsApiVersion>
|
||||
<TgsClientVersion>9.1.1</TgsClientVersion>
|
||||
<TgsDmapiVersion>5.2.10</TgsDmapiVersion>
|
||||
<TgsDmapiVersion>5.2.11</TgsDmapiVersion>
|
||||
<TgsHostWatchdogVersion>1.1.0</TgsHostWatchdogVersion>
|
||||
<TgsContainerScriptVersion>1.2.0</TgsContainerScriptVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
+3
-1
@@ -1,6 +1,6 @@
|
||||
// tgstation-server DMAPI
|
||||
|
||||
#define TGS_DMAPI_VERSION "5.2.10"
|
||||
#define TGS_DMAPI_VERSION "5.2.11"
|
||||
|
||||
// All functions and datums outside this document are subject to change with any version and should not be relied on.
|
||||
|
||||
@@ -97,6 +97,8 @@
|
||||
#define TGS_EVENT_WATCHDOG_DETACH 16
|
||||
// We don't actually implement this value as the DMAPI can never receive it
|
||||
// #define TGS_EVENT_WATCHDOG_LAUNCH 17
|
||||
// Same here. We don't actually implement this value as the DMAPI can never receive it
|
||||
// #define TGS_EVENT_WORLD_END_PROCESS 18
|
||||
|
||||
// OTHER ENUMS
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ namespace Tgstation.Server.Host.Components.Events
|
||||
WatchdogLaunch,
|
||||
|
||||
/// <summary>
|
||||
/// Inbetween DD restarts if the process has been force-ended by the DMAPI (TgsEndProcess())
|
||||
/// In between DD restarts if the process has been force-ended by the DMAPI (TgsEndProcess())
|
||||
/// </summary>
|
||||
[EventScript("WorldEndProcess")]
|
||||
WorldEndProcess,
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
{
|
||||
case MonitorActivationReason.ActiveServerCrashed:
|
||||
if (Server.TerminationWasRequested)
|
||||
await eventConsumer.HandleEvent(EventType.WorldEndProcess, Enumerable.Empty<string>(), cancellationToken).ConfigureAwait(false);
|
||||
await EventConsumer.HandleEvent(EventType.WorldEndProcess, Enumerable.Empty<string>(), cancellationToken).ConfigureAwait(false);
|
||||
|
||||
string exitWord = Server.TerminationWasRequested ? "exited" : "crashed";
|
||||
if (Server.RebootState == Session.RebootState.Shutdown)
|
||||
|
||||
@@ -83,6 +83,11 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
/// </summary>
|
||||
protected IAsyncDelayer AsyncDelayer { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="IEventConsumer"/> that is not the <see cref="WatchdogBase"/>
|
||||
/// </summary>
|
||||
protected IEventConsumer EventConsumer { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="Api.Models.Instance"/> for the <see cref="WatchdogBase"/>.
|
||||
/// </summary>
|
||||
@@ -118,11 +123,6 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
/// </summary>
|
||||
readonly IIOManager diagnosticsIOManager;
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="IEventConsumer"/> that is not the <see cref="WatchdogBase"/>
|
||||
/// </summary>
|
||||
public IEventConsumer eventConsumer;
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="IRemoteDeploymentManagerFactory"/> for the <see cref="WatchdogBase"/>.
|
||||
/// </summary>
|
||||
@@ -179,7 +179,7 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
/// <param name="serverControl">The <see cref="IServerControl"/> to populate <see cref="restartRegistration"/> with</param>
|
||||
/// <param name="asyncDelayer">The value of <see cref="AsyncDelayer"/>.</param>
|
||||
/// <param name="diagnosticsIOManager">The value of <see cref="diagnosticsIOManager"/>.</param>
|
||||
/// <param name="eventConsumer">The value of <see cref="eventConsumer"/>.</param>
|
||||
/// <param name="eventConsumer">The value of <see cref="EventConsumer"/>.</param>
|
||||
/// <param name="remoteDeploymentManagerFactory">The value of <see cref="remoteDeploymentManagerFactory"/>.</param>
|
||||
/// <param name="logger">The value of <see cref="Logger"/></param>
|
||||
/// <param name="initialLaunchParameters">The initial value of <see cref="ActiveLaunchParameters"/>. May be modified</param>
|
||||
@@ -208,7 +208,7 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
this.jobManager = jobManager ?? throw new ArgumentNullException(nameof(jobManager));
|
||||
AsyncDelayer = asyncDelayer ?? throw new ArgumentNullException(nameof(asyncDelayer));
|
||||
this.diagnosticsIOManager = diagnosticsIOManager ?? throw new ArgumentNullException(nameof(diagnosticsIOManager));
|
||||
this.eventConsumer = eventConsumer ?? throw new ArgumentNullException(nameof(eventConsumer));
|
||||
EventConsumer = eventConsumer ?? throw new ArgumentNullException(nameof(eventConsumer));
|
||||
this.remoteDeploymentManagerFactory = remoteDeploymentManagerFactory ?? throw new ArgumentNullException(nameof(remoteDeploymentManagerFactory));
|
||||
Logger = logger ?? throw new ArgumentNullException(nameof(logger));
|
||||
ActiveLaunchParameters = initialLaunchParameters ?? throw new ArgumentNullException(nameof(initialLaunchParameters));
|
||||
@@ -267,7 +267,7 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
return;
|
||||
if (!graceful)
|
||||
{
|
||||
var eventTask = eventConsumer.HandleEvent(releaseServers ? EventType.WatchdogDetach : EventType.WatchdogShutdown, null, cancellationToken);
|
||||
var eventTask = EventConsumer.HandleEvent(releaseServers ? EventType.WatchdogDetach : EventType.WatchdogShutdown, null, cancellationToken);
|
||||
|
||||
var chatTask = announce ? Chat.QueueWatchdogMessage("Shutting down...", cancellationToken) : Task.CompletedTask;
|
||||
|
||||
@@ -378,7 +378,7 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
cancellationToken); // simple announce
|
||||
if (reattachInfo == null)
|
||||
announceTask = Task.WhenAll(
|
||||
eventConsumer.HandleEvent(EventType.WatchdogLaunch, Enumerable.Empty<string>(), cancellationToken),
|
||||
EventConsumer.HandleEvent(EventType.WatchdogLaunch, Enumerable.Empty<string>(), cancellationToken),
|
||||
announceTask);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
|
||||
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<WebPublishMethod>FileSystem</WebPublishMethod>
|
||||
<PublishProvider>FileSystem</PublishProvider>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||
<SiteUrlToLaunchAfterPublish />
|
||||
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
|
||||
<ExcludeApp_Data>False</ExcludeApp_Data>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
|
||||
<ProjectGuid>2b69ad6d-2b5a-4023-8ead-0bd1b18e028a</ProjectGuid>
|
||||
<SelfContained>false</SelfContained>
|
||||
<publishUrl>bin\Release\netcoreapp3.1\publish\</publishUrl>
|
||||
<DeleteExistingFiles>False</DeleteExistingFiles>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user