mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-26 22:48:20 +01:00
Send new server version and port in one topic message
- Move reattach SendCommand call out of Watchdog into existing SessionController call. - DMAPI 5.2.0, send back custom commands on reattach and accept NewPort - Remove IAssemblyInformationProvider from watchdogs AGAIN - Deprecate TopicCommandType 6
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
//tgstation-server DMAPI
|
||||
|
||||
#define TGS_DMAPI_VERSION "5.1.1"
|
||||
#define TGS_DMAPI_VERSION "5.2.0"
|
||||
|
||||
//All functions and datums outside this document are subject to change with any version and should not be relied on
|
||||
|
||||
|
||||
@@ -12,13 +12,14 @@
|
||||
#define DMAPI5_BRIDGE_COMMAND_CHAT_SEND 5
|
||||
|
||||
#define DMAPI5_PARAMETER_ACCESS_IDENTIFIER "accessIdentifier"
|
||||
#define DMAPI5_PARAMETER_CUSTOM_COMMANDS "customCommands"
|
||||
|
||||
#define DMAPI5_RESPONSE_ERROR_MESSAGE "errorMessage"
|
||||
|
||||
#define DMAPI5_BRIDGE_PARAMETER_COMMAND_TYPE "commandType"
|
||||
#define DMAPI5_BRIDGE_PARAMETER_CURRENT_PORT "currentPort"
|
||||
#define DMAPI5_BRIDGE_PARAMETER_VERSION "version"
|
||||
#define DMAPI5_BRIDGE_PARAMETER_CHAT_MESSAGE "chatMessage"
|
||||
#define DMAPI5_BRIDGE_PARAMETER_CUSTOM_COMMANDS "customCommands"
|
||||
#define DMAPI5_BRIDGE_PARAMETER_MINIMUM_SECURITY_LEVEL "minimumSecurityLevel"
|
||||
|
||||
#define DMAPI5_BRIDGE_RESPONSE_NEW_PORT "newPort"
|
||||
|
||||
+19
-9
@@ -16,7 +16,7 @@
|
||||
var/list/chat_channels
|
||||
|
||||
/datum/tgs_api/v5/ApiVersion()
|
||||
return new /datum/tgs_version("5.1.1")
|
||||
return new /datum/tgs_version("5.2.0")
|
||||
|
||||
/datum/tgs_api/v5/OnWorldNew(minimum_required_security_level)
|
||||
server_port = world.params[DMAPI5_PARAM_SERVER_PORT]
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
var/datum/tgs_version/api_version = ApiVersion()
|
||||
version = null
|
||||
var/list/bridge_response = Bridge(DMAPI5_BRIDGE_COMMAND_STARTUP, list(DMAPI5_BRIDGE_PARAMETER_MINIMUM_SECURITY_LEVEL = minimum_required_security_level, DMAPI5_BRIDGE_PARAMETER_VERSION = api_version.raw_parameter, DMAPI5_BRIDGE_PARAMETER_CUSTOM_COMMANDS = ListCustomCommands()))
|
||||
var/list/bridge_response = Bridge(DMAPI5_BRIDGE_COMMAND_STARTUP, list(DMAPI5_BRIDGE_PARAMETER_MINIMUM_SECURITY_LEVEL = minimum_required_security_level, DMAPI5_BRIDGE_PARAMETER_VERSION = api_version.raw_parameter, DMAPI5_PARAMETER_CUSTOM_COMMANDS = ListCustomCommands()))
|
||||
if(!istype(bridge_response))
|
||||
TGS_ERROR_LOG("Failed initial bridge request!")
|
||||
return FALSE
|
||||
@@ -201,17 +201,27 @@
|
||||
if(DMAPI5_TOPIC_COMMAND_HEARTBEAT)
|
||||
return TopicResponse()
|
||||
if(DMAPI5_TOPIC_COMMAND_WATCHDOG_REATTACH)
|
||||
var/new_port = topic_parameters[DMAPI5_TOPIC_PARAMETER_NEW_PORT]
|
||||
var/error_message = null
|
||||
if (new_port != null)
|
||||
if (!isnum(new_port) || !(new_port > 0))
|
||||
error_message = "Invalid [DMAPI5_TOPIC_PARAMETER_NEW_PORT]]"
|
||||
else
|
||||
server_port = new_port
|
||||
|
||||
var/new_version_string = topic_parameters[DMAPI5_TOPIC_PARAMETER_NEW_SERVER_VERSION]
|
||||
if (!istext(new_version_string))
|
||||
return TopicResponse("Invalid or missing [DMAPI5_TOPIC_PARAMETER_NEW_SERVER_VERSION]]")
|
||||
if(error_message != null)
|
||||
error_message += ", "
|
||||
error_message += "Invalid or missing [DMAPI5_TOPIC_PARAMETER_NEW_SERVER_VERSION]]"
|
||||
else
|
||||
var/datum/tgs_version/new_version = new(new_version_string)
|
||||
if (event_handler)
|
||||
event_handler.HandleEvent(TGS_EVENT_WATCHDOG_REATTACH, new_version)
|
||||
|
||||
var/datum/tgs_version/new_version = new(new_version_string)
|
||||
if (event_handler)
|
||||
event_handler.HandleEvent(TGS_EVENT_WATCHDOG_REATTACH, new_version)
|
||||
version = new_version
|
||||
|
||||
version = new_version
|
||||
|
||||
return TopicResponse()
|
||||
return json_encode(list(DMAPI5_RESPONSE_ERROR_MESSAGE = error_message, DMAPI5_PARAMETER_CUSTOM_COMMANDS = ListCustomCommands()))
|
||||
|
||||
return TopicResponse("Unknown command: [command]")
|
||||
|
||||
|
||||
@@ -12,13 +12,14 @@
|
||||
#undef DMAPI5_BRIDGE_COMMAND_CHAT_SEND
|
||||
|
||||
#undef DMAPI5_PARAMETER_ACCESS_IDENTIFIER
|
||||
#undef DMAPI5_PARAMETER_CUSTOM_COMMANDS
|
||||
|
||||
#undef DMAPI5_RESPONSE_ERROR_MESSAGE
|
||||
|
||||
#undef DMAPI5_BRIDGE_PARAMETER_COMMAND_TYPE
|
||||
#undef DMAPI5_BRIDGE_PARAMETER_CURRENT_PORT
|
||||
#undef DMAPI5_BRIDGE_PARAMETER_VERSION
|
||||
#undef DMAPI5_BRIDGE_PARAMETER_CHAT_MESSAGE
|
||||
#undef DMAPI5_BRIDGE_PARAMETER_CUSTOM_COMMANDS
|
||||
#undef DMAPI5_BRIDGE_PARAMETER_MINIMUM_SECURITY_LEVEL
|
||||
|
||||
#undef DMAPI5_BRIDGE_RESPONSE_NEW_PORT
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Tgstation.Server.Host.Components.Interop
|
||||
/// <summary>
|
||||
/// The DMAPI <see cref="Version"/> being used.
|
||||
/// </summary>
|
||||
public static readonly Version Version = new Version(5, 1, 1);
|
||||
public static readonly Version Version = new Version(5, 2, 0);
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="JsonSerializerSettings"/> for use when communicating with the DMAPI.
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
namespace Tgstation.Server.Host.Components.Interop.Topic
|
||||
using System;
|
||||
|
||||
namespace Tgstation.Server.Host.Components.Interop.Topic
|
||||
{
|
||||
/// <summary>
|
||||
/// The type of topic command being sent.
|
||||
@@ -38,6 +40,7 @@
|
||||
/// <summary>
|
||||
/// The server's port was possibly changed.
|
||||
/// </summary>
|
||||
[Obsolete("Deprecated", true)]
|
||||
ServerPortUpdate,
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -82,9 +82,8 @@ namespace Tgstation.Server.Host.Components.Interop.Topic
|
||||
/// Initializes a new instance of the <see cref="TopicParameters"/> <see langword="class"/>.
|
||||
/// </summary>
|
||||
/// <param name="newPort">The value of <see cref="NewPort"/>.</param>
|
||||
/// <param name="forServer">If this is for a <see cref="TopicCommandType.ServerPortUpdate"/>.</param>
|
||||
public TopicParameters(ushort newPort, bool forServer)
|
||||
: this(forServer ? TopicCommandType.ServerPortUpdate : TopicCommandType.ChangePort)
|
||||
public TopicParameters(ushort newPort)
|
||||
: this(TopicCommandType.ChangePort)
|
||||
{
|
||||
NewPort = newPort;
|
||||
}
|
||||
@@ -123,10 +122,12 @@ namespace Tgstation.Server.Host.Components.Interop.Topic
|
||||
/// Initializes a new instance of the <see cref="TopicParameters"/> <see langword="class"/>.
|
||||
/// </summary>
|
||||
/// <param name="newServerVersion">The value of <see cref="NewServerVersion"/>.</param>
|
||||
public TopicParameters(Version newServerVersion)
|
||||
/// <param name="serverPort">TGS's new API port.</param>
|
||||
public TopicParameters(Version newServerVersion, ushort serverPort)
|
||||
: this(TopicCommandType.ServerRestarted)
|
||||
{
|
||||
NewServerVersion = newServerVersion ?? throw new ArgumentNullException(nameof(newServerVersion));
|
||||
NewPort = serverPort;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using Tgstation.Server.Host.Components.Chat.Commands;
|
||||
|
||||
namespace Tgstation.Server.Host.Components.Interop.Topic
|
||||
{
|
||||
@@ -16,5 +17,10 @@ namespace Tgstation.Server.Host.Components.Interop.Topic
|
||||
/// The <see cref="ChatMessage"/>s to send as the result of a <see cref="TopicCommandType.EventNotification"/> request, if any.
|
||||
/// </summary>
|
||||
public ICollection<ChatMessage> ChatResponses { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The DMAPI <see cref="CustomCommand"/>s for <see cref="TopicCommandType.ServerRestarted"/> requests.
|
||||
/// </summary>
|
||||
public ICollection<CustomCommand> CustomCommands { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ using System.Linq;
|
||||
using System.Net;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Tgstation.Server.Api;
|
||||
using Tgstation.Server.Api.Models;
|
||||
using Tgstation.Server.Host.Components.Byond;
|
||||
using Tgstation.Server.Host.Components.Chat;
|
||||
@@ -194,6 +195,7 @@ namespace Tgstation.Server.Host.Components.Session
|
||||
/// <param name="bridgeRegistrar">The <see cref="IBridgeRegistrar"/> used to populate <see cref="bridgeRegistration"/>.</param>
|
||||
/// <param name="chat">The value of <see cref="chat"/></param>
|
||||
/// <param name="chatTrackingContext">The value of <see cref="chatTrackingContext"/></param>
|
||||
/// <param name="assemblyInformationProvider">The <see cref="IAssemblyInformationProvider"/> for the <see cref="SessionController"/>.</param>
|
||||
/// <param name="logger">The value of <see cref="logger"/></param>
|
||||
/// <param name="startupTimeout">The optional time to wait before failing the <see cref="LaunchResult"/></param>
|
||||
/// <param name="reattached">If this is a reattached session.</param>
|
||||
@@ -205,6 +207,7 @@ namespace Tgstation.Server.Host.Components.Session
|
||||
IChatTrackingContext chatTrackingContext,
|
||||
IBridgeRegistrar bridgeRegistrar,
|
||||
IChatManager chat,
|
||||
IAssemblyInformationProvider assemblyInformationProvider,
|
||||
ILogger<SessionController> logger,
|
||||
uint? startupTimeout,
|
||||
bool reattached)
|
||||
@@ -263,12 +266,19 @@ namespace Tgstation.Server.Host.Components.Session
|
||||
using (cts = new CancellationTokenSource())
|
||||
try
|
||||
{
|
||||
await SendCommand(
|
||||
var reattachResponse = await SendCommand(
|
||||
new TopicParameters(
|
||||
reattachInformation.RuntimeInformation.ServerPort,
|
||||
true),
|
||||
assemblyInformationProvider.Version,
|
||||
reattachInformation.RuntimeInformation.ServerPort),
|
||||
cts.Token)
|
||||
.ConfigureAwait(false);
|
||||
|
||||
if (reattachResponse.InteropResponse?.CustomCommands != null)
|
||||
this.chatTrackingContext.CustomCommands = reattachResponse.InteropResponse.CustomCommands.ToList();
|
||||
else if (reattachResponse.InteropResponse != null)
|
||||
logger.LogWarning(
|
||||
"DMAPI v{0} isn't returning the TGS custom commands list. Functionality added in v5.2.0.",
|
||||
Dmb.CompileJob.DMApiVersion.Semver());
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -585,7 +595,7 @@ namespace Tgstation.Server.Host.Components.Session
|
||||
async Task<bool> ImmediateTopicPortChange()
|
||||
{
|
||||
var commandResult = await SendCommand(
|
||||
new TopicParameters(port, false),
|
||||
new TopicParameters(port),
|
||||
cancellationToken)
|
||||
.ConfigureAwait(false);
|
||||
|
||||
|
||||
@@ -289,6 +289,7 @@ namespace Tgstation.Server.Host.Components.Session
|
||||
chatTrackingContext,
|
||||
bridgeRegistrar,
|
||||
chat,
|
||||
assemblyInformationProvider,
|
||||
loggerFactory.CreateLogger<SessionController>(),
|
||||
launchParameters.StartupTimeout,
|
||||
false);
|
||||
@@ -353,6 +354,7 @@ namespace Tgstation.Server.Host.Components.Session
|
||||
chatTrackingContext,
|
||||
bridgeRegistrar,
|
||||
chat,
|
||||
assemblyInformationProvider,
|
||||
loggerFactory.CreateLogger<SessionController>(),
|
||||
null,
|
||||
true);
|
||||
|
||||
@@ -11,7 +11,6 @@ using Tgstation.Server.Host.Components.Session;
|
||||
using Tgstation.Server.Host.Core;
|
||||
using Tgstation.Server.Host.Database;
|
||||
using Tgstation.Server.Host.Jobs;
|
||||
using Tgstation.Server.Host.System;
|
||||
|
||||
namespace Tgstation.Server.Host.Components.Watchdog
|
||||
{
|
||||
@@ -50,7 +49,6 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
/// <param name="jobManager">The <see cref="IJobManager"/> for the <see cref="WatchdogBase"/>.</param>
|
||||
/// <param name="serverControl">The <see cref="IServerControl"/> for the <see cref="WatchdogBase"/>.</param>
|
||||
/// <param name="asyncDelayer">The <see cref="IAsyncDelayer"/> for the <see cref="WatchdogBase"/>.</param>
|
||||
/// <param name="assemblyInformationProvider">The <see cref="IAssemblyInformationProvider"/> for the <see cref="WatchdogBase"/>.</param>
|
||||
/// <param name="logger">The <see cref="ILogger"/> for the <see cref="WatchdogBase"/>.</param>
|
||||
/// <param name="initialLaunchParameters">The <see cref="DreamDaemonLaunchParameters"/> for the <see cref="WatchdogBase"/>.</param>
|
||||
/// <param name="instance">The <see cref="Api.Models.Instance"/> for the <see cref="WatchdogBase"/>.</param>
|
||||
@@ -64,7 +62,6 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
IJobManager jobManager,
|
||||
IServerControl serverControl,
|
||||
IAsyncDelayer asyncDelayer,
|
||||
IAssemblyInformationProvider assemblyInformationProvider,
|
||||
ILogger<BasicWatchdog> logger,
|
||||
DreamDaemonLaunchParameters initialLaunchParameters,
|
||||
Api.Models.Instance instance,
|
||||
@@ -78,7 +75,6 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
jobManager,
|
||||
serverControl,
|
||||
asyncDelayer,
|
||||
assemblyInformationProvider,
|
||||
logger,
|
||||
initialLaunchParameters,
|
||||
instance,
|
||||
|
||||
@@ -12,7 +12,6 @@ using Tgstation.Server.Host.Components.Session;
|
||||
using Tgstation.Server.Host.Core;
|
||||
using Tgstation.Server.Host.Database;
|
||||
using Tgstation.Server.Host.Jobs;
|
||||
using Tgstation.Server.Host.System;
|
||||
|
||||
namespace Tgstation.Server.Host.Components.Watchdog
|
||||
{
|
||||
@@ -61,7 +60,6 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
/// <param name="jobManager">The <see cref="IJobManager"/> for the <see cref="WatchdogBase"/>.</param>
|
||||
/// <param name="serverControl">The <see cref="IServerControl"/> for the <see cref="WatchdogBase"/>.</param>
|
||||
/// <param name="asyncDelayer">The <see cref="IAsyncDelayer"/> for the <see cref="WatchdogBase"/>.</param>
|
||||
/// <param name="assemblyInformationProvider">The <see cref="IAssemblyInformationProvider"/> for the <see cref="WatchdogBase"/>.</param>
|
||||
/// <param name="logger">The <see cref="ILogger"/> for the <see cref="WatchdogBase"/>.</param>
|
||||
/// <param name="initialLaunchParameters">The <see cref="DreamDaemonLaunchParameters"/> for the <see cref="WatchdogBase"/>.</param>
|
||||
/// <param name="instance">The <see cref="Api.Models.Instance"/> for the <see cref="WatchdogBase"/>.</param>
|
||||
@@ -75,7 +73,6 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
IJobManager jobManager,
|
||||
IServerControl serverControl,
|
||||
IAsyncDelayer asyncDelayer,
|
||||
IAssemblyInformationProvider assemblyInformationProvider,
|
||||
ILogger<ExperimentalWatchdog> logger,
|
||||
DreamDaemonLaunchParameters initialLaunchParameters,
|
||||
Api.Models.Instance instance, bool autoStart)
|
||||
@@ -88,7 +85,6 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
jobManager,
|
||||
serverControl,
|
||||
asyncDelayer,
|
||||
assemblyInformationProvider,
|
||||
logger,
|
||||
initialLaunchParameters,
|
||||
instance,
|
||||
|
||||
@@ -17,7 +17,6 @@ using Tgstation.Server.Host.Core;
|
||||
using Tgstation.Server.Host.Database;
|
||||
using Tgstation.Server.Host.Extensions;
|
||||
using Tgstation.Server.Host.Jobs;
|
||||
using Tgstation.Server.Host.System;
|
||||
|
||||
namespace Tgstation.Server.Host.Components.Watchdog
|
||||
{
|
||||
@@ -113,11 +112,6 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
/// </summary>
|
||||
readonly IRestartRegistration restartRegistration;
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="IAssemblyInformationProvider"/> for the <see cref="WatchdogBase"/>.
|
||||
/// </summary>
|
||||
readonly IAssemblyInformationProvider assemblyInformationProvider;
|
||||
|
||||
/// <summary>
|
||||
/// If the <see cref="WatchdogBase"/> should <see cref="LaunchImplNoLock(bool, bool, DualReattachInformation, CancellationToken)"/> in <see cref="StartAsync(CancellationToken)"/>
|
||||
/// </summary>
|
||||
@@ -164,7 +158,6 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
/// <param name="jobManager">The value of <see cref="jobManager"/></param>
|
||||
/// <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="assemblyInformationProvider">The value of <see cref="assemblyInformationProvider"/></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>
|
||||
/// <param name="instance">The value of <see cref="instance"/></param>
|
||||
@@ -178,7 +171,6 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
IJobManager jobManager,
|
||||
IServerControl serverControl,
|
||||
IAsyncDelayer asyncDelayer,
|
||||
IAssemblyInformationProvider assemblyInformationProvider,
|
||||
ILogger logger,
|
||||
DreamDaemonLaunchParameters initialLaunchParameters,
|
||||
Api.Models.Instance instance,
|
||||
@@ -191,7 +183,6 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
this.databaseContextFactory = databaseContextFactory ?? throw new ArgumentNullException(nameof(databaseContextFactory));
|
||||
this.jobManager = jobManager ?? throw new ArgumentNullException(nameof(jobManager));
|
||||
AsyncDelayer = asyncDelayer ?? throw new ArgumentNullException(nameof(asyncDelayer));
|
||||
this.assemblyInformationProvider = assemblyInformationProvider ?? throw new ArgumentNullException(nameof(assemblyInformationProvider));
|
||||
Logger = logger ?? throw new ArgumentNullException(nameof(logger));
|
||||
ActiveLaunchParameters = initialLaunchParameters ?? throw new ArgumentNullException(nameof(initialLaunchParameters));
|
||||
this.instance = instance ?? throw new ArgumentNullException(nameof(instance));
|
||||
@@ -870,14 +861,6 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
{
|
||||
using (await SemaphoreSlimContext.Lock(Semaphore, ct).ConfigureAwait(false))
|
||||
await LaunchImplNoLock(true, true, reattachInfo, ct).ConfigureAwait(false);
|
||||
|
||||
if (!Running)
|
||||
return;
|
||||
var server = GetActiveController();
|
||||
if (server == null)
|
||||
return;
|
||||
|
||||
await server.SendCommand(new TopicParameters(assemblyInformationProvider.Version), cancellationToken).ConfigureAwait(false);
|
||||
}, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ using Tgstation.Server.Host.Core;
|
||||
using Tgstation.Server.Host.Database;
|
||||
using Tgstation.Server.Host.IO;
|
||||
using Tgstation.Server.Host.Jobs;
|
||||
using Tgstation.Server.Host.System;
|
||||
|
||||
namespace Tgstation.Server.Host.Components.Watchdog
|
||||
{
|
||||
@@ -42,11 +41,6 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
/// </summary>
|
||||
protected IAsyncDelayer AsyncDelayer { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="IAssemblyInformationProvider"/> for the <see cref="WatchdogFactory"/>
|
||||
/// </summary>
|
||||
protected IAssemblyInformationProvider AssemblyInformationProvider { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="Configuration.GeneralConfiguration"/> for the <see cref="WatchdogFactory"/>
|
||||
/// </summary>
|
||||
@@ -60,7 +54,6 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
/// <param name="databaseContextFactory">The value of <see cref="DatabaseContextFactory"/></param>
|
||||
/// <param name="jobManager">The value of <see cref="JobManager"/></param>
|
||||
/// <param name="asyncDelayer">The value of <see cref="AsyncDelayer"/></param>
|
||||
/// <param name="assemblyInformationProvider">The value of <see cref="AssemblyInformationProvider"/>.</param>
|
||||
/// <param name="generalConfigurationOptions">The <see cref="IOptions{TOptions}"/> containing the value of <see cref="GeneralConfiguration"/></param>
|
||||
public WatchdogFactory(
|
||||
IServerControl serverControl,
|
||||
@@ -68,7 +61,6 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
IDatabaseContextFactory databaseContextFactory,
|
||||
IJobManager jobManager,
|
||||
IAsyncDelayer asyncDelayer,
|
||||
IAssemblyInformationProvider assemblyInformationProvider,
|
||||
IOptions<GeneralConfiguration> generalConfigurationOptions)
|
||||
{
|
||||
ServerControl = serverControl ?? throw new ArgumentNullException(nameof(serverControl));
|
||||
@@ -76,7 +68,6 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
DatabaseContextFactory = databaseContextFactory ?? throw new ArgumentNullException(nameof(databaseContextFactory));
|
||||
JobManager = jobManager ?? throw new ArgumentNullException(nameof(jobManager));
|
||||
AsyncDelayer = asyncDelayer ?? throw new ArgumentNullException(nameof(asyncDelayer));
|
||||
AssemblyInformationProvider = assemblyInformationProvider ?? throw new ArgumentNullException(nameof(assemblyInformationProvider));
|
||||
GeneralConfiguration = generalConfigurationOptions?.Value ?? throw new ArgumentNullException(nameof(generalConfigurationOptions));
|
||||
}
|
||||
|
||||
@@ -100,7 +91,6 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
JobManager,
|
||||
ServerControl,
|
||||
AsyncDelayer,
|
||||
AssemblyInformationProvider,
|
||||
LoggerFactory.CreateLogger<ExperimentalWatchdog>(),
|
||||
settings,
|
||||
instance,
|
||||
@@ -137,7 +127,6 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
JobManager,
|
||||
ServerControl,
|
||||
AsyncDelayer,
|
||||
AssemblyInformationProvider,
|
||||
LoggerFactory.CreateLogger<BasicWatchdog>(),
|
||||
settings,
|
||||
instance,
|
||||
|
||||
@@ -10,7 +10,6 @@ using Tgstation.Server.Host.Core;
|
||||
using Tgstation.Server.Host.Database;
|
||||
using Tgstation.Server.Host.IO;
|
||||
using Tgstation.Server.Host.Jobs;
|
||||
using Tgstation.Server.Host.System;
|
||||
|
||||
namespace Tgstation.Server.Host.Components.Watchdog
|
||||
{
|
||||
@@ -54,7 +53,6 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
/// <param name="databaseContextFactory">The <see cref="IDatabaseContextFactory"/> for the <see cref="WatchdogBase"/>.</param>
|
||||
/// <param name="jobManager">The <see cref="IJobManager"/> for the <see cref="WatchdogBase"/>.</param>
|
||||
/// <param name="serverControl">The <see cref="IServerControl"/> for the <see cref="WatchdogBase"/>.</param>
|
||||
/// <param name="assemblyInformationProvider">The <see cref="IAssemblyInformationProvider"/> for the <see cref="WatchdogBase"/>.</param>
|
||||
/// <param name="asyncDelayer">The <see cref="IAsyncDelayer"/> for the <see cref="WatchdogBase"/>.</param>
|
||||
/// <param name="ioManager">The value of <see cref="ioManager"/>.</param>
|
||||
/// <param name="symlinkFactory">The value of <see cref="symlinkFactory"/>.</param>
|
||||
@@ -71,7 +69,6 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
IJobManager jobManager,
|
||||
IServerControl serverControl,
|
||||
IAsyncDelayer asyncDelayer,
|
||||
IAssemblyInformationProvider assemblyInformationProvider,
|
||||
IIOManager ioManager,
|
||||
ISymlinkFactory symlinkFactory,
|
||||
ILogger<WindowsWatchdog> logger,
|
||||
@@ -86,7 +83,6 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
jobManager,
|
||||
serverControl,
|
||||
asyncDelayer,
|
||||
assemblyInformationProvider,
|
||||
logger,
|
||||
initialLaunchParameters,
|
||||
instance,
|
||||
|
||||
@@ -10,7 +10,6 @@ using Tgstation.Server.Host.Core;
|
||||
using Tgstation.Server.Host.Database;
|
||||
using Tgstation.Server.Host.IO;
|
||||
using Tgstation.Server.Host.Jobs;
|
||||
using Tgstation.Server.Host.System;
|
||||
|
||||
namespace Tgstation.Server.Host.Components.Watchdog
|
||||
{
|
||||
@@ -32,7 +31,6 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
/// <param name="databaseContextFactory">The <see cref="IDatabaseContextFactory"/> for the <see cref="WatchdogFactory"/>.</param>
|
||||
/// <param name="jobManager">The <see cref="IJobManager"/> for the <see cref="WatchdogFactory"/>.</param>
|
||||
/// <param name="asyncDelayer">The <see cref="IAsyncDelayer"/> for the <see cref="WatchdogFactory"/>.</param>
|
||||
/// <param name="assemblyInformationProvider">The <see cref="IAssemblyInformationProvider"/> for the <see cref="WatchdogFactory"/>.</param>
|
||||
/// <param name="symlinkFactory">The value of <see cref="symlinkFactory"/>.</param>
|
||||
/// <param name="generalConfigurationOptions">The <see cref="IOptions{TOptions}"/> for <see cref="GeneralConfiguration"/> for the <see cref="WatchdogFactory"/>.</param>
|
||||
public WindowsWatchdogFactory(
|
||||
@@ -41,7 +39,6 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
IDatabaseContextFactory databaseContextFactory,
|
||||
IJobManager jobManager,
|
||||
IAsyncDelayer asyncDelayer,
|
||||
IAssemblyInformationProvider assemblyInformationProvider,
|
||||
ISymlinkFactory symlinkFactory,
|
||||
IOptions<GeneralConfiguration> generalConfigurationOptions)
|
||||
: base(
|
||||
@@ -50,7 +47,6 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
databaseContextFactory,
|
||||
jobManager,
|
||||
asyncDelayer,
|
||||
assemblyInformationProvider,
|
||||
generalConfigurationOptions)
|
||||
{
|
||||
this.symlinkFactory = symlinkFactory ?? throw new ArgumentNullException(nameof(symlinkFactory));
|
||||
@@ -74,7 +70,6 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
JobManager,
|
||||
ServerControl,
|
||||
AsyncDelayer,
|
||||
AssemblyInformationProvider,
|
||||
ioManager,
|
||||
symlinkFactory,
|
||||
LoggerFactory.CreateLogger<WindowsWatchdog>(),
|
||||
|
||||
Reference in New Issue
Block a user