diff --git a/_advanced_watchdog_8cs_source.html b/_advanced_watchdog_8cs_source.html index faffb1958b..5b4414943e 100644 --- a/_advanced_watchdog_8cs_source.html +++ b/_advanced_watchdog_8cs_source.html @@ -513,17 +513,17 @@ $(document).ready(function() { init_codefold(0); });
Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.ApplyInitialDmb
ValueTask ApplyInitialDmb(CancellationToken cancellationToken)
Set the ReattachInformation.InitialDmb for the BasicWatchdog.Server.
Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.HandleMonitorWakeup
override async ValueTask< MonitorAction > HandleMonitorWakeup(MonitorActivationReason reason, CancellationToken cancellationToken)
Definition AdvancedWatchdog.cs:338
Tgstation.Server.Host.Components.Watchdog.BasicWatchdog
A IWatchdog that manages one server.
Definition BasicWatchdog.cs:26
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.jobManager
readonly IJobManager jobManager
The IJobManager for the WatchdogBase.
Definition WatchdogBase.cs:135
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger
ILogger< WatchdogBase > Logger
The ILogger for the WatchdogBase.
Definition WatchdogBase.cs:85
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ActiveCompileJob
Models.? CompileJob ActiveCompileJob
Retrieves the Models.CompileJob currently running on the server.
Definition WatchdogBase.cs:72
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.autoStart
readonly bool autoStart
If the WatchdogBase should LaunchNoLock(bool, bool, bool, ReattachInformation, CancellationToken) in ...
Definition WatchdogBase.cs:155
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.eventConsumer
readonly IEventConsumer eventConsumer
The IEventConsumer that is not the WatchdogBase.
Definition WatchdogBase.cs:130
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAsync
async ValueTask DisposeAsync()
Definition WatchdogBase.cs:267
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.remoteDeploymentManagerFactory
readonly IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory
The IRemoteDeploymentManagerFactory for the WatchdogBase.
Definition WatchdogBase.cs:150
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.diagnosticsIOManager
readonly IIOManager diagnosticsIOManager
The IIOManager pointing to the Diagnostics directory.
Definition WatchdogBase.cs:145
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ActiveLaunchParameters
DreamDaemonLaunchParameters ActiveLaunchParameters
The DreamDaemonLaunchParameters to be applied.
Definition WatchdogBase.cs:66
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.BeforeApplyDmb
async ValueTask BeforeApplyDmb(Models.CompileJob newCompileJob, CancellationToken cancellationToken)
To be called before a given newCompileJob goes live.
Definition WatchdogBase.cs:726
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat
IChatManager Chat
The IChatManager for the WatchdogBase.
Definition WatchdogBase.cs:90
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.jobManager
readonly IJobManager jobManager
The IJobManager for the WatchdogBase.
Definition WatchdogBase.cs:134
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger
ILogger< WatchdogBase > Logger
The ILogger for the WatchdogBase.
Definition WatchdogBase.cs:84
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ActiveCompileJob
Models.? CompileJob ActiveCompileJob
Retrieves the Models.CompileJob currently running on the server.
Definition WatchdogBase.cs:71
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.autoStart
readonly bool autoStart
If the WatchdogBase should LaunchNoLock(bool, bool, bool, ReattachInformation, CancellationToken) in ...
Definition WatchdogBase.cs:154
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.eventConsumer
readonly IEventConsumer eventConsumer
The IEventConsumer that is not the WatchdogBase.
Definition WatchdogBase.cs:129
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAsync
async ValueTask DisposeAsync()
Definition WatchdogBase.cs:266
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.remoteDeploymentManagerFactory
readonly IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory
The IRemoteDeploymentManagerFactory for the WatchdogBase.
Definition WatchdogBase.cs:149
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.diagnosticsIOManager
readonly IIOManager diagnosticsIOManager
The IIOManager pointing to the Diagnostics directory.
Definition WatchdogBase.cs:144
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ActiveLaunchParameters
DreamDaemonLaunchParameters ActiveLaunchParameters
The DreamDaemonLaunchParameters to be applied.
Definition WatchdogBase.cs:65
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.BeforeApplyDmb
async ValueTask BeforeApplyDmb(Models.CompileJob newCompileJob, CancellationToken cancellationToken)
To be called before a given newCompileJob goes live.
Definition WatchdogBase.cs:725
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat
IChatManager Chat
The IChatManager for the WatchdogBase.
Definition WatchdogBase.cs:89
Tgstation.Server.Host.Server
Definition Server.cs:26
Tgstation.Server.Host.Server.Restart
ValueTask Restart()
Restarts the Host.A ValueTask representing the running operation.
Tgstation.Server.Host.Utils.AsyncDelayer
Definition AsyncDelayer.cs:12
diff --git a/_application_8cs_source.html b/_application_8cs_source.html index c935064fb8..fbf5a699f3 100644 --- a/_application_8cs_source.html +++ b/_application_8cs_source.html @@ -900,7 +900,7 @@ $(document).ready(function() { init_codefold(0); });
Tgstation.Server.Host.IO.PosixPostWriteHandler
IPostWriteHandler for POSIX systems.
Definition PosixPostWriteHandler.cs:13
Tgstation.Server.Host.IO.ResolvingIOManager
An IIOManager that resolve relative paths from another IIOManager to a subdirectory of that.
Definition ResolvingIOManager.cs:10
Tgstation.Server.Host.IO.SynchronousIOManager
Definition SynchronousIOManager.cs:15
- +
Tgstation.Server.Host.IO.WindowsPostWriteHandler
IPostWriteHandler for Windows systems.
Definition WindowsPostWriteHandler.cs:9
Tgstation.Server.Host.Jobs.JobService
Definition JobService.cs:29
Tgstation.Server.Host.Jobs.JobsHubGroupMapper
Handles mapping groups for the JobsHub.
Definition JobsHubGroupMapper.cs:24
@@ -929,7 +929,7 @@ $(document).ready(function() { init_codefold(0); });
Tgstation.Server.Host.System.PosixSignalHandler
Handles POSIX signals.
Definition PosixSignalHandler.cs:19
Tgstation.Server.Host.System.ProcessExecutor
Definition ProcessExecutor.cs:19
Tgstation.Server.Host.System.SystemDManager
Implements the SystemD notify service protocol.
Definition SystemDManager.cs:20
-
Tgstation.Server.Host.System.WindowsNetworkPromptReaper
Definition WindowsNetworkPromptReaper.cs:20
+
Tgstation.Server.Host.System.WindowsNetworkPromptReaper
Definition WindowsNetworkPromptReaper.cs:19
Tgstation.Server.Host.System.WindowsProcessFeatures
Definition WindowsProcessFeatures.cs:23
Tgstation.Server.Host.Transfer.FileTransferService
Implementation of the file transfer service.
Definition FileTransferService.cs:21
Tgstation.Server.Host.Utils.AbstractHttpClientFactory
Definition AbstractHttpClientFactory.cs:13
diff --git a/_basic_watchdog_8cs_source.html b/_basic_watchdog_8cs_source.html index 87c3a289d2..ab1e392fd2 100644 --- a/_basic_watchdog_8cs_source.html +++ b/_basic_watchdog_8cs_source.html @@ -404,22 +404,22 @@ $(document).ready(function() { init_codefold(0); });
Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.HandleMonitorWakeup
override async ValueTask< MonitorAction > HandleMonitorWakeup(MonitorActivationReason reason, CancellationToken cancellationToken)
Definition BasicWatchdog.cs:110
Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.gracefulRebootRequired
bool gracefulRebootRequired
If the server is set to gracefully reboot due to a pending dmb or settings change.
Definition BasicWatchdog.cs:41
Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.GetActiveController
override? ISessionController GetActiveController()
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase
Base class for IWatchdogs.
Definition WatchdogBase.cs:37
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.jobManager
readonly IJobManager jobManager
The IJobManager for the WatchdogBase.
Definition WatchdogBase.cs:135
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger
ILogger< WatchdogBase > Logger
The ILogger for the WatchdogBase.
Definition WatchdogBase.cs:85
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ReattachFailure
async ValueTask ReattachFailure(CancellationToken cancellationToken)
Call from InitController(ValueTask, ReattachInformation, CancellationToken) when a reattach operation...
Definition WatchdogBase.cs:669
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.autoStart
readonly bool autoStart
If the WatchdogBase should LaunchNoLock(bool, bool, bool, ReattachInformation, CancellationToken) in ...
Definition WatchdogBase.cs:155
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.CheckLaunchResult
async ValueTask CheckLaunchResult(ISessionController controller, string serverName, CancellationToken cancellationToken)
Check the LaunchResult of a given controller for errors and throw a JobException if any are detected...
Definition WatchdogBase.cs:649
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.eventConsumer
readonly IEventConsumer eventConsumer
The IEventConsumer that is not the WatchdogBase.
Definition WatchdogBase.cs:130
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Status
WatchdogStatus Status
The current WatchdogStatus.
Definition WatchdogBase.cs:49
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.remoteDeploymentManagerFactory
readonly IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory
The IRemoteDeploymentManagerFactory for the WatchdogBase.
Definition WatchdogBase.cs:150
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.diagnosticsIOManager
readonly IIOManager diagnosticsIOManager
The IIOManager pointing to the Diagnostics directory.
Definition WatchdogBase.cs:145
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ActiveLaunchParameters
DreamDaemonLaunchParameters ActiveLaunchParameters
The DreamDaemonLaunchParameters to be applied.
Definition WatchdogBase.cs:66
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.BeforeApplyDmb
async ValueTask BeforeApplyDmb(Models.CompileJob newCompileJob, CancellationToken cancellationToken)
To be called before a given newCompileJob goes live.
Definition WatchdogBase.cs:726
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAndNullControllers
async ValueTask DisposeAndNullControllers(CancellationToken cancellationToken)
Wrapper for DisposeAndNullControllersImpl under a locked context.
Definition WatchdogBase.cs:693
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.SessionId
long? SessionId
An incrementing ID for representing current server execution.
Definition WatchdogBase.cs:39
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat
IChatManager Chat
The IChatManager for the WatchdogBase.
Definition WatchdogBase.cs:90
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleEventImpl
async ValueTask HandleEventImpl(EventType eventType, IEnumerable< string > parameters, bool relayToSession, CancellationToken cancellationToken)
Handle a given eventType without re-throwing errors.
Definition WatchdogBase.cs:767
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase
Base class for IWatchdogs.
Definition WatchdogBase.cs:36
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.jobManager
readonly IJobManager jobManager
The IJobManager for the WatchdogBase.
Definition WatchdogBase.cs:134
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger
ILogger< WatchdogBase > Logger
The ILogger for the WatchdogBase.
Definition WatchdogBase.cs:84
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ReattachFailure
async ValueTask ReattachFailure(CancellationToken cancellationToken)
Call from InitController(ValueTask, ReattachInformation, CancellationToken) when a reattach operation...
Definition WatchdogBase.cs:668
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.autoStart
readonly bool autoStart
If the WatchdogBase should LaunchNoLock(bool, bool, bool, ReattachInformation, CancellationToken) in ...
Definition WatchdogBase.cs:154
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.CheckLaunchResult
async ValueTask CheckLaunchResult(ISessionController controller, string serverName, CancellationToken cancellationToken)
Check the LaunchResult of a given controller for errors and throw a JobException if any are detected...
Definition WatchdogBase.cs:648
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.eventConsumer
readonly IEventConsumer eventConsumer
The IEventConsumer that is not the WatchdogBase.
Definition WatchdogBase.cs:129
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Status
WatchdogStatus Status
The current WatchdogStatus.
Definition WatchdogBase.cs:48
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.remoteDeploymentManagerFactory
readonly IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory
The IRemoteDeploymentManagerFactory for the WatchdogBase.
Definition WatchdogBase.cs:149
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.diagnosticsIOManager
readonly IIOManager diagnosticsIOManager
The IIOManager pointing to the Diagnostics directory.
Definition WatchdogBase.cs:144
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ActiveLaunchParameters
DreamDaemonLaunchParameters ActiveLaunchParameters
The DreamDaemonLaunchParameters to be applied.
Definition WatchdogBase.cs:65
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.BeforeApplyDmb
async ValueTask BeforeApplyDmb(Models.CompileJob newCompileJob, CancellationToken cancellationToken)
To be called before a given newCompileJob goes live.
Definition WatchdogBase.cs:725
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAndNullControllers
async ValueTask DisposeAndNullControllers(CancellationToken cancellationToken)
Wrapper for DisposeAndNullControllersImpl under a locked context.
Definition WatchdogBase.cs:692
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.SessionId
long? SessionId
An incrementing ID for representing current server execution.
Definition WatchdogBase.cs:38
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat
IChatManager Chat
The IChatManager for the WatchdogBase.
Definition WatchdogBase.cs:89
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleEventImpl
async ValueTask HandleEventImpl(EventType eventType, IEnumerable< string > parameters, bool relayToSession, CancellationToken cancellationToken)
Handle a given eventType without re-throwing errors.
Definition WatchdogBase.cs:766
Tgstation.Server.Host.Server
Definition Server.cs:26
Tgstation.Server.Host.Components.Chat.IChatManager
For managing connected chat services.
Definition IChatManager.cs:15
Tgstation.Server.Host.Components.Chat.IChatManager.QueueWatchdogMessage
void QueueWatchdogMessage(string message)
Queue a chat message to configured watchdog channels.
diff --git a/_posix_watchdog_8cs_source.html b/_posix_watchdog_8cs_source.html index b842ecd9d8..2135452622 100644 --- a/_posix_watchdog_8cs_source.html +++ b/_posix_watchdog_8cs_source.html @@ -169,14 +169,14 @@ $(document).ready(function() { init_codefold(0); });
Tgstation.Server.Host.Components.Watchdog.PosixWatchdog.PosixWatchdog
PosixWatchdog(IChatManager chat, ISessionControllerFactory sessionControllerFactory, IDmbFactory dmbFactory, ISessionPersistor sessionPersistor, IJobManager jobManager, IServerControl serverControl, IAsyncDelayer asyncDelayer, IIOManager diagnosticsIOManager, IEventConsumer eventConsumer, IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory, IIOManager gameIOManager, IFilesystemLinkFactory linkFactory, ILogger< PosixWatchdog > logger, DreamDaemonLaunchParameters initialLaunchParameters, Api.Models.Instance instance, GeneralConfiguration generalConfiguration, bool autoStart)
Initializes a new instance of the PosixWatchdog class.
Definition PosixWatchdog.cs:53
Tgstation.Server.Host.Components.Watchdog.PosixWatchdog.CreateSwappableDmbProvider
override SwappableDmbProvider CreateSwappableDmbProvider(IDmbProvider dmbProvider)
Tgstation.Server.Host.Components.Watchdog.PosixWatchdog.ApplyInitialDmb
override ValueTask ApplyInitialDmb(CancellationToken cancellationToken)
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.jobManager
readonly IJobManager jobManager
The IJobManager for the WatchdogBase.
Definition WatchdogBase.cs:135
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger
ILogger< WatchdogBase > Logger
The ILogger for the WatchdogBase.
Definition WatchdogBase.cs:85
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.autoStart
readonly bool autoStart
If the WatchdogBase should LaunchNoLock(bool, bool, bool, ReattachInformation, CancellationToken) in ...
Definition WatchdogBase.cs:155
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.eventConsumer
readonly IEventConsumer eventConsumer
The IEventConsumer that is not the WatchdogBase.
Definition WatchdogBase.cs:130
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.remoteDeploymentManagerFactory
readonly IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory
The IRemoteDeploymentManagerFactory for the WatchdogBase.
Definition WatchdogBase.cs:150
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.diagnosticsIOManager
readonly IIOManager diagnosticsIOManager
The IIOManager pointing to the Diagnostics directory.
Definition WatchdogBase.cs:145
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.GameIOManager
IIOManager GameIOManager
The IIOManager for the WatchdogBase pointing to the Game directory.
Definition WatchdogBase.cs:110
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ActiveLaunchParameters
DreamDaemonLaunchParameters ActiveLaunchParameters
The DreamDaemonLaunchParameters to be applied.
Definition WatchdogBase.cs:66
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.jobManager
readonly IJobManager jobManager
The IJobManager for the WatchdogBase.
Definition WatchdogBase.cs:134
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger
ILogger< WatchdogBase > Logger
The ILogger for the WatchdogBase.
Definition WatchdogBase.cs:84
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.autoStart
readonly bool autoStart
If the WatchdogBase should LaunchNoLock(bool, bool, bool, ReattachInformation, CancellationToken) in ...
Definition WatchdogBase.cs:154
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.eventConsumer
readonly IEventConsumer eventConsumer
The IEventConsumer that is not the WatchdogBase.
Definition WatchdogBase.cs:129
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.remoteDeploymentManagerFactory
readonly IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory
The IRemoteDeploymentManagerFactory for the WatchdogBase.
Definition WatchdogBase.cs:149
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.diagnosticsIOManager
readonly IIOManager diagnosticsIOManager
The IIOManager pointing to the Diagnostics directory.
Definition WatchdogBase.cs:144
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.GameIOManager
IIOManager GameIOManager
The IIOManager for the WatchdogBase pointing to the Game directory.
Definition WatchdogBase.cs:109
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ActiveLaunchParameters
DreamDaemonLaunchParameters ActiveLaunchParameters
The DreamDaemonLaunchParameters to be applied.
Definition WatchdogBase.cs:65
Tgstation.Server.Host.Configuration.GeneralConfiguration
General configuration options.
Definition GeneralConfiguration.cs:23
Tgstation.Server.Host.Components.Chat.IChatManager
For managing connected chat services.
Definition IChatManager.cs:15
Tgstation.Server.Host.Components.Deployment.IDmbFactory
Factory for IDmbProviders.
Definition IDmbFactory.cs:14
diff --git a/_tgstation_8_server_8_host_8_service_2_program_8cs_source.html b/_tgstation_8_server_8_host_8_service_2_program_8cs_source.html index e7df52d2b1..f1e7edb767 100644 --- a/_tgstation_8_server_8_host_8_service_2_program_8cs_source.html +++ b/_tgstation_8_server_8_host_8_service_2_program_8cs_source.html @@ -231,102 +231,101 @@ $(document).ready(function() { init_codefold(0); });
190 // Mimicing Tgstation.Server.Host.Service.Wix here, which is the source of truth for this data
191 installer.Context = new InstallContext(
192 Path.Combine(programDataDirectory, $"tgs-install-{Guid.NewGuid()}.log"),
-
193 new[]
-
194 {
-
195 $"assemblypath=\"{exePath}\"{(String.IsNullOrWhiteSpace(PassthroughArgs) ? String.Empty : $" -p=\"{PassthroughArgs}\"")}",
-
196 });
-
197 installer.Description = $"{Server.Common.Constants.CanonicalPackageName} running as a Windows service.";
-
198 installer.DisplayName = Server.Common.Constants.CanonicalPackageName;
-
199 installer.StartType = ServiceStartMode.Automatic;
-
200 installer.ServicesDependedOn = new string[] { "Tcpip", "Dhcp", "Dnscache" };
-
201 installer.ServiceName = ServerService.Name;
-
202 installer.Parent = processInstaller;
-
203
-
204 var state = new ListDictionary();
-
205 try
-
206 {
-
207 installer.Install(state);
-
208
-
209 installer.Commit(state);
-
210 }
-
211 catch
-
212 {
-
213 installer.Rollback(state);
-
214 throw;
-
215 }
-
216 }
-
217
-
222 bool RunServiceInstall()
-
223 {
-
224 // First check if the service already exists
-
225 bool serviceStopped = false;
-
226 if (Force || !WindowsServiceHelpers.IsWindowsService())
-
227 foreach (ServiceController sc in ServiceController.GetServices())
-
228 using (sc)
-
229 {
-
230 var serviceName = sc.ServiceName;
-
231 if (serviceName == ServerService.Name || serviceName == "tgstation-server-4")
-
232 {
-
233 NativeMethods.DialogResult result = !Force
-
234 ? NativeMethods.MessageBox(
-
235 default,
-
236 $"You already have another TGS service installed ({sc.ServiceName}). Would you like to uninstall it now? Pressing \"No\" will cancel this install.",
-
237 "TGS Service",
-
238 NativeMethods.MessageBoxButtons.YesNo)
-
239 : NativeMethods.DialogResult.Yes;
-
240 if (result != NativeMethods.DialogResult.Yes)
-
241 return false; // is this needed after exit?
-
242
-
243 // Stop it first to give it some cleanup time
-
244 RestartService(sc);
-
245
-
246 // And remove it
-
247 InvokeSC(sc.ServiceName);
-
248 }
-
249 }
-
250
-
251 InvokeSC(null);
-
252
-
253 return serviceStopped;
-
254 }
-
255
-
260 void RestartService(ServiceController serviceController)
-
261 {
-
262 if (serviceController.Status != ServiceControllerStatus.Running)
-
263 return;
-
264
-
265 var stop = !Detach;
-
266 if (!stop)
-
267 {
-
268 var serviceControllerCommand = PipeCommands.GetServiceCommandId(PipeCommands.CommandDetachingShutdown);
-
269 serviceController.ExecuteCommand(serviceControllerCommand!.Value);
-
270 serviceController.WaitForStatus(ServiceControllerStatus.Stopped, TimeSpan.FromSeconds(30));
-
271 if (serviceController.Status != ServiceControllerStatus.Stopped)
-
272 stop = true;
-
273 }
-
274
-
275 if (stop)
-
276 {
-
277 serviceController.Stop();
-
278 serviceController.WaitForStatus(ServiceControllerStatus.Stopped);
-
279 }
-
280 }
-
281
-
287 async ValueTask RunConfigure(CancellationToken cancellationToken)
-
288 {
-
289 using var loggerFactory = LoggerFactory.Create(builder =>
-
290 {
-
291 if (!Silent)
-
292 builder.AddConsole();
-
293 });
-
294
-
295 var watchdog = WatchdogFactory.CreateWatchdog(new NoopSignalChecker(), loggerFactory);
-
296 await watchdog.RunAsync(true, GetPassthroughArgs(), cancellationToken);
-
297 }
-
298
-
303 string[] GetPassthroughArgs() => PassthroughArgs?.Split(' ', StringSplitOptions.RemoveEmptyEntries) ?? Array.Empty<string>();
-
304 }
-
305}
+
193 [
+
194 $"assemblypath=\"{exePath}\"{(String.IsNullOrWhiteSpace(PassthroughArgs) ? String.Empty : $" -p=\"{PassthroughArgs}\"")}",
+
195 ]);
+
196 installer.Description = $"{Server.Common.Constants.CanonicalPackageName} running as a Windows service.";
+
197 installer.DisplayName = Server.Common.Constants.CanonicalPackageName;
+
198 installer.StartType = ServiceStartMode.Automatic;
+
199 installer.ServicesDependedOn = new string[] { "Tcpip", "Dhcp", "Dnscache" };
+
200 installer.ServiceName = ServerService.Name;
+
201 installer.Parent = processInstaller;
+
202
+
203 var state = new ListDictionary();
+
204 try
+
205 {
+
206 installer.Install(state);
+
207
+
208 installer.Commit(state);
+
209 }
+
210 catch
+
211 {
+
212 installer.Rollback(state);
+
213 throw;
+
214 }
+
215 }
+
216
+
221 bool RunServiceInstall()
+
222 {
+
223 // First check if the service already exists
+
224 bool serviceStopped = false;
+
225 if (Force || !WindowsServiceHelpers.IsWindowsService())
+
226 foreach (ServiceController sc in ServiceController.GetServices())
+
227 using (sc)
+
228 {
+
229 var serviceName = sc.ServiceName;
+
230 if (serviceName == ServerService.Name || serviceName == "tgstation-server-4")
+
231 {
+
232 NativeMethods.DialogResult result = !Force
+
233 ? NativeMethods.MessageBox(
+
234 default,
+
235 $"You already have another TGS service installed ({sc.ServiceName}). Would you like to uninstall it now? Pressing \"No\" will cancel this install.",
+
236 "TGS Service",
+
237 NativeMethods.MessageBoxButtons.YesNo)
+
238 : NativeMethods.DialogResult.Yes;
+
239 if (result != NativeMethods.DialogResult.Yes)
+
240 return false; // is this needed after exit?
+
241
+
242 // Stop it first to give it some cleanup time
+
243 RestartService(sc);
+
244
+
245 // And remove it
+
246 InvokeSC(sc.ServiceName);
+
247 }
+
248 }
+
249
+
250 InvokeSC(null);
+
251
+
252 return serviceStopped;
+
253 }
+
254
+
259 void RestartService(ServiceController serviceController)
+
260 {
+
261 if (serviceController.Status != ServiceControllerStatus.Running)
+
262 return;
+
263
+
264 var stop = !Detach;
+
265 if (!stop)
+
266 {
+
267 var serviceControllerCommand = PipeCommands.GetServiceCommandId(PipeCommands.CommandDetachingShutdown);
+
268 serviceController.ExecuteCommand(serviceControllerCommand!.Value);
+
269 serviceController.WaitForStatus(ServiceControllerStatus.Stopped, TimeSpan.FromSeconds(30));
+
270 if (serviceController.Status != ServiceControllerStatus.Stopped)
+
271 stop = true;
+
272 }
+
273
+
274 if (stop)
+
275 {
+
276 serviceController.Stop();
+
277 serviceController.WaitForStatus(ServiceControllerStatus.Stopped);
+
278 }
+
279 }
+
280
+
286 async ValueTask RunConfigure(CancellationToken cancellationToken)
+
287 {
+
288 using var loggerFactory = LoggerFactory.Create(builder =>
+
289 {
+
290 if (!Silent)
+
291 builder.AddConsole();
+
292 });
+
293
+
294 var watchdog = WatchdogFactory.CreateWatchdog(new NoopSignalChecker(), loggerFactory);
+
295 await watchdog.RunAsync(true, GetPassthroughArgs(), cancellationToken);
+
296 }
+
297
+
302 string[] GetPassthroughArgs() => PassthroughArgs?.Split(' ', StringSplitOptions.RemoveEmptyEntries) ?? Array.Empty<string>();
+
303 }
+
304}
Tgstation.Server.Host.Common.PipeCommands
Values able to be passed via the update file path.
Definition PipeCommands.cs:7
Tgstation.Server.Host.Common.PipeCommands.GetServiceCommandId
static ? int GetServiceCommandId(string command)
Gets the int value of a given command .
Tgstation.Server.Host.Common.PipeCommands.CommandDetachingShutdown
const string CommandDetachingShutdown
Stops the server ASAP, detaching the watchdog for any running instances.
Definition PipeCommands.cs:21
diff --git a/_watchdog_base_8cs_source.html b/_watchdog_base_8cs_source.html index 1fdb8fbb4d..812a9b3715 100644 --- a/_watchdog_base_8cs_source.html +++ b/_watchdog_base_8cs_source.html @@ -84,1122 +84,1121 @@ $(document).ready(function() { init_codefold(0); });
Go to the documentation of this file.
1using System;
-
3using System.Linq;
- - -
6
-
7using BetterWin32Errors;
-
8
- -
10
-
11using Serilog.Context;
-
12
- - - - - - - - - - - - - - - - -
29
- -
31{
-
35#pragma warning disable CA1506 // TODO: Decomplexify
-
- -
37 {
- -
40
-
42 public uint? ClientCount { get; private set; }
-
43
- -
46
-
- -
49 {
-
50 get => status;
-
51 protected set
-
52 {
- -
54 status = value;
-
55 Logger.LogTrace("Status set from {oldStatus} to {status}", oldStatus, status);
-
56 }
-
57 }
+ +
4using System.Linq;
+ + +
7
+ +
9
+
10using Serilog.Context;
+
11
+ + + + + + + + + + + + + + + + +
28
+ +
30{
+
34#pragma warning disable CA1506 // TODO: Decomplexify
+
+ +
36 {
+ +
39
+
41 public uint? ClientCount { get; private set; }
+
42
+ +
45
+
+ +
48 {
+
49 get => status;
+
50 protected set
+
51 {
+ +
53 status = value;
+
54 Logger.LogTrace("Status set from {oldStatus} to {status}", oldStatus, status);
+
55 }
+
56 }
-
58
- -
61
-
63 public abstract bool AlphaIsActive { get; }
-
64
- -
67
-
69 public DreamDaemonLaunchParameters? LastLaunchParameters { get; protected set; }
-
70
-
72 public Models.CompileJob? ActiveCompileJob => GetActiveController()?.CompileJob;
-
73
-
75 public abstract RebootState? RebootState { get; }
-
76
- -
81
-
85 protected ILogger<WatchdogBase> Logger { get; }
-
86
-
90 protected IChatManager Chat { get; }
-
91
- -
96
-
100 protected IDmbFactory DmbFactory { get; }
-
101
-
105 protected IAsyncDelayer AsyncDelayer { get; }
-
106
-
110 protected IIOManager GameIOManager { get; }
-
111
- -
116
- -
121
- -
126
- -
131
- -
136
- -
141
- -
146
- -
151
- -
156
-
160 volatile TaskCompletionSource activeParametersUpdated;
-
161
- -
166
- -
171
- -
176
- -
181
- -
186
- -
191
-
-
210 protected WatchdogBase(
-
211 IChatManager chat,
-
212 ISessionControllerFactory sessionControllerFactory,
-
213 IDmbFactory dmbFactory,
- - -
216 IServerControl serverControl,
-
217 IAsyncDelayer asyncDelayer,
- - - -
221 IIOManager gameIOManager,
- - -
224 Api.Models.Instance metadata,
-
225 bool autoStart)
-
226 {
-
227 Chat = chat ?? throw new ArgumentNullException(nameof(chat));
-
228 SessionControllerFactory = sessionControllerFactory ?? throw new ArgumentNullException(nameof(sessionControllerFactory));
-
229 DmbFactory = dmbFactory ?? throw new ArgumentNullException(nameof(dmbFactory));
- - -
232 AsyncDelayer = asyncDelayer ?? throw new ArgumentNullException(nameof(asyncDelayer));
- - - -
236 GameIOManager = gameIOManager ?? throw new ArgumentNullException(nameof(gameIOManager));
-
237 Logger = logger ?? throw new ArgumentNullException(nameof(logger));
- - - -
241
-
242 ArgumentNullException.ThrowIfNull(serverControl);
-
243
-
244 chat.RegisterCommandHandler(this);
-
245
- -
247 releaseServers = false;
-
248 activeParametersUpdated = new TaskCompletionSource();
-
249
-
250 restartRegistration = serverControl.RegisterForRestart(this);
-
251 try
-
252 {
- - -
255 }
-
256 catch
-
257 {
-
258 restartRegistration.Dispose();
-
259 synchronizationSemaphore?.Dispose();
-
260 throw;
-
261 }
-
262
-
263 Logger.LogTrace("Created watchdog");
-
264 }
+
57
+ +
60
+
62 public abstract bool AlphaIsActive { get; }
+
63
+ +
66
+
68 public DreamDaemonLaunchParameters? LastLaunchParameters { get; protected set; }
+
69
+
71 public Models.CompileJob? ActiveCompileJob => GetActiveController()?.CompileJob;
+
72
+
74 public abstract RebootState? RebootState { get; }
+
75
+ +
80
+
84 protected ILogger<WatchdogBase> Logger { get; }
+
85
+
89 protected IChatManager Chat { get; }
+
90
+ +
95
+
99 protected IDmbFactory DmbFactory { get; }
+
100
+
104 protected IAsyncDelayer AsyncDelayer { get; }
+
105
+
109 protected IIOManager GameIOManager { get; }
+
110
+ +
115
+ +
120
+ +
125
+ +
130
+ +
135
+ +
140
+ +
145
+ +
150
+ +
155
+
159 volatile TaskCompletionSource activeParametersUpdated;
+
160
+ +
165
+ +
170
+ +
175
+ +
180
+ +
185
+ +
190
+
+
209 protected WatchdogBase(
+
210 IChatManager chat,
+
211 ISessionControllerFactory sessionControllerFactory,
+
212 IDmbFactory dmbFactory,
+ + +
215 IServerControl serverControl,
+
216 IAsyncDelayer asyncDelayer,
+ + + +
220 IIOManager gameIOManager,
+ + +
223 Api.Models.Instance metadata,
+
224 bool autoStart)
+
225 {
+
226 Chat = chat ?? throw new ArgumentNullException(nameof(chat));
+
227 SessionControllerFactory = sessionControllerFactory ?? throw new ArgumentNullException(nameof(sessionControllerFactory));
+
228 DmbFactory = dmbFactory ?? throw new ArgumentNullException(nameof(dmbFactory));
+ + +
231 AsyncDelayer = asyncDelayer ?? throw new ArgumentNullException(nameof(asyncDelayer));
+ + + +
235 GameIOManager = gameIOManager ?? throw new ArgumentNullException(nameof(gameIOManager));
+
236 Logger = logger ?? throw new ArgumentNullException(nameof(logger));
+ + + +
240
+
241 ArgumentNullException.ThrowIfNull(serverControl);
+
242
+
243 chat.RegisterCommandHandler(this);
+
244
+ +
246 releaseServers = false;
+
247 activeParametersUpdated = new TaskCompletionSource();
+
248
+
249 restartRegistration = serverControl.RegisterForRestart(this);
+
250 try
+
251 {
+ + +
254 }
+
255 catch
+
256 {
+
257 restartRegistration.Dispose();
+
258 synchronizationSemaphore?.Dispose();
+
259 throw;
+
260 }
+
261
+
262 Logger.LogTrace("Created watchdog");
+
263 }
-
265
-
- -
268 {
-
269 Logger.LogTrace("Disposing...");
-
270 synchronizationSemaphore.Dispose();
-
271 restartRegistration.Dispose();
-
272
- - -
275 monitorCts?.Dispose();
-
276 disposed = true;
-
277 }
+
264
+
+ +
267 {
+
268 Logger.LogTrace("Disposing...");
+
269 synchronizationSemaphore.Dispose();
+
270 restartRegistration.Dispose();
+
271
+ + +
274 monitorCts?.Dispose();
+
275 disposed = true;
+
276 }
-
278
-
- -
281 {
- -
283 {
- - - -
287 if (!currentEngine.HasValue)
-
288 return false;
-
289
-
290 bool match = launchParameters.CanApplyWithoutReboot(currentLaunchParameters, currentEngine.Value);
-
291 if (match || Status == WatchdogStatus.Offline || Status == WatchdogStatus.DelayedRestart)
-
292 return false;
-
293
-
294 var oldTcs = Interlocked.Exchange(ref activeParametersUpdated, new TaskCompletionSource());
-
295 oldTcs.SetResult();
-
296 }
-
297
-
298 return true;
-
299 }
+
277
+
+ +
280 {
+ +
282 {
+ + + +
286 if (!currentEngine.HasValue)
+
287 return false;
+
288
+
289 bool match = launchParameters.CanApplyWithoutReboot(currentLaunchParameters, currentEngine.Value);
+
290 if (match || Status == WatchdogStatus.Offline || Status == WatchdogStatus.DelayedRestart)
+
291 return false;
+
292
+
293 var oldTcs = Interlocked.Exchange(ref activeParametersUpdated, new TaskCompletionSource());
+
294 oldTcs.SetResult();
+
295 }
+
296
+
297 return true;
+
298 }
-
300
-
- -
303 {
- -
305 {
- - - -
309 if (Status != WatchdogStatus.Online || activeServer == null)
-
310 return new MessageContent
-
311 {
-
312 Text = "TGS: Server offline!",
-
313 };
-
314
- -
316
-
317 if (commandResult == null)
-
318 return new MessageContent
-
319 {
-
320 Text = "TGS: Bad topic exchange!",
-
321 };
-
322
-
323 if (commandResult == null)
-
324 return new MessageContent
-
325 {
-
326 Text = "TGS: Bad topic response!",
-
327 };
-
328
- -
330 {
-
331 Text = commandResult.CommandResponse?.Text ?? commandResult.CommandResponseMessage,
-
332 Embed = commandResult.CommandResponse?.Embed,
-
333 };
-
334
-
335 if (commandResponse.Text == null && commandResponse.Embed == null)
-
336 {
-
337 commandResponse.Text = "TGS: Command processed but no DMAPI response returned!";
-
338 }
-
339
- -
341
-
342 return commandResponse;
-
343 }
-
344 }
+
299
+
+ +
302 {
+ +
304 {
+ + + +
308 if (Status != WatchdogStatus.Online || activeServer == null)
+
309 return new MessageContent
+
310 {
+
311 Text = "TGS: Server offline!",
+
312 };
+
313
+ +
315
+
316 if (commandResult == null)
+
317 return new MessageContent
+
318 {
+
319 Text = "TGS: Bad topic exchange!",
+
320 };
+
321
+
322 if (commandResult == null)
+
323 return new MessageContent
+
324 {
+
325 Text = "TGS: Bad topic response!",
+
326 };
+
327
+ +
329 {
+
330 Text = commandResult.CommandResponse?.Text ?? commandResult.CommandResponseMessage,
+
331 Embed = commandResult.CommandResponse?.Embed,
+
332 };
+
333
+
334 if (commandResponse.Text == null && commandResponse.Embed == null)
+
335 {
+
336 commandResponse.Text = "TGS: Command processed but no DMAPI response returned!";
+
337 }
+
338
+ +
340
+
341 return commandResponse;
+
342 }
+
343 }
-
345
-
-
347 public async ValueTask Launch(CancellationToken cancellationToken)
-
348 {
-
349 if (Status != WatchdogStatus.Offline)
-
350 throw new JobException(ErrorCode.WatchdogRunning);
- -
352 await LaunchNoLock(true, true, true, null, cancellationToken);
-
353 }
+
344
+
+
346 public async ValueTask Launch(CancellationToken cancellationToken)
+
347 {
+
348 if (Status != WatchdogStatus.Offline)
+
349 throw new JobException(ErrorCode.WatchdogRunning);
+ +
351 await LaunchNoLock(true, true, true, null, cancellationToken);
+
352 }
-
354
-
-
356 public virtual async ValueTask ResetRebootState(CancellationToken cancellationToken)
-
357 {
- -
359 {
-
360 if (Status == WatchdogStatus.Offline)
-
361 return;
- -
363 if (toClear != null)
-
364 await toClear.SetRebootState(Session.RebootState.Normal, cancellationToken);
-
365 }
-
366 }
+
353
+
+
355 public virtual async ValueTask ResetRebootState(CancellationToken cancellationToken)
+
356 {
+ +
358 {
+
359 if (Status == WatchdogStatus.Offline)
+
360 return;
+ +
362 if (toClear != null)
+
363 await toClear.SetRebootState(Session.RebootState.Normal, cancellationToken);
+
364 }
+
365 }
-
367
-
-
369 public async ValueTask Restart(bool graceful, CancellationToken cancellationToken)
-
370 {
-
371 if (Status == WatchdogStatus.Offline)
-
372 throw new JobException(ErrorCode.WatchdogNotRunning);
-
373
-
374 Logger.LogTrace("Begin Restart. Graceful: {gracefulFlag}", graceful);
- -
376 {
-
377 if (!graceful)
-
378 {
-
379 Chat.QueueWatchdogMessage("Manual restart triggered...");
- -
381 await LaunchNoLock(true, false, true, null, cancellationToken);
-
382 return;
-
383 }
-
384
- -
386 if (toReboot != null
-
387 && !await toReboot.SetRebootState(Session.RebootState.Restart, cancellationToken))
-
388 Logger.LogWarning("Unable to send reboot state change event!");
-
389 }
-
390 }
+
366
+
+
368 public async ValueTask Restart(bool graceful, CancellationToken cancellationToken)
+
369 {
+
370 if (Status == WatchdogStatus.Offline)
+
371 throw new JobException(ErrorCode.WatchdogNotRunning);
+
372
+
373 Logger.LogTrace("Begin Restart. Graceful: {gracefulFlag}", graceful);
+ +
375 {
+
376 if (!graceful)
+
377 {
+
378 Chat.QueueWatchdogMessage("Manual restart triggered...");
+ +
380 await LaunchNoLock(true, false, true, null, cancellationToken);
+
381 return;
+
382 }
+
383
+ +
385 if (toReboot != null
+
386 && !await toReboot.SetRebootState(Session.RebootState.Restart, cancellationToken))
+
387 Logger.LogWarning("Unable to send reboot state change event!");
+
388 }
+
389 }
-
391
-
-
393 public async Task StartAsync(CancellationToken cancellationToken)
-
394 {
- -
396 var reattaching = reattachInfo != null;
-
397 if (!autoStart && !reattaching)
-
398 return;
-
399
-
400 var job = Models.Job.Create(
- -
402 ? JobCode.StartupWatchdogReattach
-
403 : JobCode.StartupWatchdogLaunch,
-
404 null,
-
405 metadata,
-
406 DreamDaemonRights.Shutdown);
- -
408 job,
-
409 async (core, databaseContextFactory, paramJob, progressFunction, ct) =>
-
410 {
-
411 if (core?.Watchdog != this)
- -
413
- -
415 await LaunchNoLock(true, true, true, reattachInfo, ct);
-
416
- -
418 },
- -
420 }
+
390
+
+
392 public async Task StartAsync(CancellationToken cancellationToken)
+
393 {
+ +
395 var reattaching = reattachInfo != null;
+
396 if (!autoStart && !reattaching)
+
397 return;
+
398
+
399 var job = Models.Job.Create(
+ +
401 ? JobCode.StartupWatchdogReattach
+
402 : JobCode.StartupWatchdogLaunch,
+
403 null,
+
404 metadata,
+
405 DreamDaemonRights.Shutdown);
+ +
407 job,
+
408 async (core, databaseContextFactory, paramJob, progressFunction, ct) =>
+
409 {
+
410 if (core?.Watchdog != this)
+ +
412
+ +
414 await LaunchNoLock(true, true, true, reattachInfo, ct);
+
415
+ +
417 },
+ +
419 }
-
421
-
423 public async Task StopAsync(CancellationToken cancellationToken) =>
- -
425
-
-
427 public async ValueTask Terminate(bool graceful, CancellationToken cancellationToken)
-
428 {
- - -
431 }
+
420
+
422 public async Task StopAsync(CancellationToken cancellationToken) =>
+ +
424
+ -
432
-
- -
435 {
- -
437 {
- -
439
-
440 if (Status != WatchdogStatus.Offline)
-
441 {
-
442 Logger.LogDebug("Waiting for server to gracefully shut down.");
- -
444 }
-
445 else
-
446 Logger.LogTrace("Graceful shutdown requested but server is already offline.");
-
447
-
448 return;
-
449 }
-
450
-
451 releaseServers = true;
-
452 if (Status == WatchdogStatus.Online)
-
453 Chat.QueueWatchdogMessage("Detaching...");
-
454 else
-
455 Logger.LogTrace("Not sending detach chat message as status is: {status}", Status);
-
456 }
+
431
+
+ +
434 {
+ +
436 {
+ +
438
+
439 if (Status != WatchdogStatus.Offline)
+
440 {
+
441 Logger.LogDebug("Waiting for server to gracefully shut down.");
+ +
443 }
+
444 else
+
445 Logger.LogTrace("Graceful shutdown requested but server is already offline.");
+
446
+
447 return;
+
448 }
+
449
+
450 releaseServers = true;
+
451 if (Status == WatchdogStatus.Online)
+
452 Chat.QueueWatchdogMessage("Detaching...");
+
453 else
+
454 Logger.LogTrace("Not sending detach chat message as status is: {status}", Status);
+
455 }
-
457
-
459 public abstract ValueTask InstanceRenamed(string newInstanceName, CancellationToken cancellationToken);
-
460
-
-
462 public async ValueTask CreateDump(CancellationToken cancellationToken)
-
463 {
- - -
466 }
+
456
+
458 public abstract ValueTask InstanceRenamed(string newInstanceName, CancellationToken cancellationToken);
+
459
+ -
467
-
-
469 public async ValueTask<bool> Broadcast(string message, CancellationToken cancellationToken)
-
470 {
-
471 ArgumentNullException.ThrowIfNull(message);
-
472
- -
474 if (activeServer == null)
-
475 {
-
476 Logger.LogInformation("Attempted broadcast failed, no active server!");
-
477 return false;
-
478 }
-
479
-
480 if (!activeServer.DMApiAvailable)
-
481 {
-
482 Logger.LogInformation("Attempted broadcast failed, no DMAPI!");
-
483 return false;
-
484 }
-
485
-
486 var minimumRequiredVersion = new Version(5, 7, 0);
-
487 if (activeServer.DMApiVersion < minimumRequiredVersion)
-
488 {
-
489 Logger.LogInformation(
-
490 "Attempted broadcast failed, insufficient interop version: {interopVersion}. Requires {minimumRequiredVersion}!",
-
491 activeServer.DMApiVersion,
- -
493 return false;
-
494 }
-
495
-
496 Logger.LogInformation("Broadcasting: {message}", message);
-
497
-
498 var response = await activeServer.SendCommand(
- - -
501
-
502 return response != null && response.ErrorMessage == null;
-
503 }
+
466
+
+
468 public async ValueTask<bool> Broadcast(string message, CancellationToken cancellationToken)
+
469 {
+
470 ArgumentNullException.ThrowIfNull(message);
+
471
+ +
473 if (activeServer == null)
+
474 {
+
475 Logger.LogInformation("Attempted broadcast failed, no active server!");
+
476 return false;
+
477 }
+
478
+
479 if (!activeServer.DMApiAvailable)
+
480 {
+
481 Logger.LogInformation("Attempted broadcast failed, no DMAPI!");
+
482 return false;
+
483 }
+
484
+
485 var minimumRequiredVersion = new Version(5, 7, 0);
+
486 if (activeServer.DMApiVersion < minimumRequiredVersion)
+
487 {
+
488 Logger.LogInformation(
+
489 "Attempted broadcast failed, insufficient interop version: {interopVersion}. Requires {minimumRequiredVersion}!",
+
490 activeServer.DMApiVersion,
+ +
492 return false;
+
493 }
+
494
+
495 Logger.LogInformation("Broadcasting: {message}", message);
+
496
+
497 var response = await activeServer.SendCommand(
+ + +
500
+
501 return response != null && response.ErrorMessage == null;
+
502 }
-
504
-
- -
507 {
- -
509
-
510 // Method explicitly implemented to prevent accidental calls when this.eventConsumer should be used.
- -
512
-
513 // Server may have ended
-
514 if (activeServer == null)
-
515 return;
-
516
- -
518 var result = await activeServer.SendCommand(
- - -
521
- -
523 }
+
503
+
+ +
506 {
+ +
508
+
509 // Method explicitly implemented to prevent accidental calls when this.eventConsumer should be used.
+ +
511
+
512 // Server may have ended
+
513 if (activeServer == null)
+
514 return;
+
515
+ +
517 var result = await activeServer.SendCommand(
+ + +
520
+ +
522 }
-
524
- -
527 => throw new NotSupportedException("Watchdogs do not support custom events!");
-
528
- -
537
-
- -
548 bool startMonitor,
-
549 bool announce,
-
550 bool announceFailure,
- -
552 CancellationToken cancellationToken)
-
553 {
-
554 Logger.LogTrace("Begin LaunchImplNoLock");
-
555 if (startMonitor && Status != WatchdogStatus.Offline)
-
556 throw new JobException(ErrorCode.WatchdogRunning);
-
557
-
558 if (reattachInfo == null && !DmbFactory.DmbAvailable)
-
559 throw new JobException(ErrorCode.WatchdogCompileJobCorrupted);
-
560
-
561 // this is necessary, the monitor could be in it's sleep loop trying to restart, if so cancel THAT monitor and start our own with blackjack and hookers
-
562 var eventTask = ValueTask.CompletedTask;
-
563 if (announce)
-
564 {
- -
566 reattachInfo == null
-
567 ? "Launching..."
-
568 : "Reattaching..."); // simple announce
-
569 if (reattachInfo == null)
-
570 eventTask = HandleEventImpl(EventType.WatchdogLaunch, Enumerable.Empty<string>(), false, cancellationToken);
-
571 }
-
572
-
573 // since neither server is running, this is safe to do
- - -
576 ClientCount = null;
-
577
-
578 try
-
579 {
- -
581 }
- -
583 {
-
584 Logger.LogTrace(ex, "Controller initialization cancelled!");
-
585 throw;
-
586 }
-
587 catch (Exception e)
-
588 {
-
589 Logger.LogWarning(e, "Failed to start watchdog!");
- - -
592 {
- -
594 if (announceFailure)
-
595 Chat.QueueWatchdogMessage("Startup failed!");
-
596 }
-
597
- -
599 throw;
-
600 }
-
601 finally
-
602 {
-
603 // finish the chat task that's in flight
-
604 try
-
605 {
- -
607 }
- -
609 {
-
610 Logger.LogTrace(ex, "Announcement task canceled!");
-
611 }
-
612 }
-
613
-
614 Logger.LogInformation("Controller(s) initialized successfully");
-
615
-
616 if (startMonitor)
-
617 {
- - -
620 }
-
621 }
+
523
+ +
526 => throw new NotSupportedException("Watchdogs do not support custom events!");
+
527
+ +
536
+
+ +
547 bool startMonitor,
+
548 bool announce,
+
549 bool announceFailure,
+ +
551 CancellationToken cancellationToken)
+
552 {
+
553 Logger.LogTrace("Begin LaunchImplNoLock");
+
554 if (startMonitor && Status != WatchdogStatus.Offline)
+
555 throw new JobException(ErrorCode.WatchdogRunning);
+
556
+
557 if (reattachInfo == null && !DmbFactory.DmbAvailable)
+
558 throw new JobException(ErrorCode.WatchdogCompileJobCorrupted);
+
559
+
560 // this is necessary, the monitor could be in it's sleep loop trying to restart, if so cancel THAT monitor and start our own with blackjack and hookers
+
561 var eventTask = ValueTask.CompletedTask;
+
562 if (announce)
+
563 {
+ +
565 reattachInfo == null
+
566 ? "Launching..."
+
567 : "Reattaching..."); // simple announce
+
568 if (reattachInfo == null)
+
569 eventTask = HandleEventImpl(EventType.WatchdogLaunch, Enumerable.Empty<string>(), false, cancellationToken);
+
570 }
+
571
+
572 // since neither server is running, this is safe to do
+ + +
575 ClientCount = null;
+
576
+
577 try
+
578 {
+ +
580 }
+ +
582 {
+
583 Logger.LogTrace(ex, "Controller initialization cancelled!");
+
584 throw;
+
585 }
+
586 catch (Exception e)
+
587 {
+
588 Logger.LogWarning(e, "Failed to start watchdog!");
+ + +
591 {
+ +
593 if (announceFailure)
+
594 Chat.QueueWatchdogMessage("Startup failed!");
+
595 }
+
596
+ +
598 throw;
+
599 }
+
600 finally
+
601 {
+
602 // finish the chat task that's in flight
+
603 try
+
604 {
+ +
606 }
+ +
608 {
+
609 Logger.LogTrace(ex, "Announcement task canceled!");
+
610 }
+
611 }
+
612
+
613 Logger.LogInformation("Controller(s) initialized successfully");
+
614
+
615 if (startMonitor)
+
616 {
+ + +
619 }
+
620 }
-
622
-
- -
628 {
-
629 Logger.LogTrace("StopMonitor");
-
630 if (monitorTask == null)
-
631 return false;
-
632 var wasRunning = !monitorTask.IsCompleted;
-
633 monitorCts!.Cancel();
- -
635 Logger.LogTrace("Stopped Monitor");
-
636 monitorCts.Dispose();
-
637 monitorTask = null;
-
638 monitorCts = null;
-
639 return wasRunning;
-
640 }
+
621
+
+ +
627 {
+
628 Logger.LogTrace("StopMonitor");
+
629 if (monitorTask == null)
+
630 return false;
+
631 var wasRunning = !monitorTask.IsCompleted;
+
632 monitorCts!.Cancel();
+ +
634 Logger.LogTrace("Stopped Monitor");
+
635 monitorCts.Dispose();
+
636 monitorTask = null;
+
637 monitorCts = null;
+
638 return wasRunning;
+
639 }
-
641
-
- -
650 {
-
651 var launchResult = await controller.LaunchResult.WaitAsync(cancellationToken);
-
652
-
653 // Dead sessions won't trigger this
-
654 if (launchResult.ExitCode.HasValue) // you killed us ray...
-
655 throw new JobException(
-
656 ErrorCode.WatchdogStartupFailed,
-
657 new JobException($"{serverName} failed to start: {launchResult}"));
-
658 if (!launchResult.StartupTime.HasValue)
-
659 throw new JobException(
-
660 ErrorCode.WatchdogStartupTimeout,
-
661 new JobException($"{serverName} timed out on startup: {ActiveLaunchParameters.StartupTimeout!.Value}s"));
-
662 }
+
640
+
+ +
649 {
+
650 var launchResult = await controller.LaunchResult.WaitAsync(cancellationToken);
+
651
+
652 // Dead sessions won't trigger this
+
653 if (launchResult.ExitCode.HasValue) // you killed us ray...
+
654 throw new JobException(
+
655 ErrorCode.WatchdogStartupFailed,
+
656 new JobException($"{serverName} failed to start: {launchResult}"));
+
657 if (!launchResult.StartupTime.HasValue)
+
658 throw new JobException(
+
659 ErrorCode.WatchdogStartupTimeout,
+
660 new JobException($"{serverName} timed out on startup: {ActiveLaunchParameters.StartupTimeout!.Value}s"));
+
661 }
-
663
-
- -
670 {
-
671 // we lost the server, just restart entirely
-
672 // DCT: Operation must always run
-
673 await DisposeAndNullControllers(CancellationToken.None);
-
674 ClientCount = null;
-
675 const string FailReattachMessage = "Unable to properly reattach to server! Restarting watchdog...";
-
676 Logger.LogWarning(FailReattachMessage);
-
677
- -
679 await InitController(ValueTask.CompletedTask, null, cancellationToken);
-
680 }
+
662
+
+ +
669 {
+
670 // we lost the server, just restart entirely
+
671 // DCT: Operation must always run
+
672 await DisposeAndNullControllers(CancellationToken.None);
+
673 ClientCount = null;
+
674 const string FailReattachMessage = "Unable to properly reattach to server! Restarting watchdog...";
+
675 Logger.LogWarning(FailReattachMessage);
+
676
+ +
678 await InitController(ValueTask.CompletedTask, null, cancellationToken);
+
679 }
-
681
- -
687
-
- -
694 {
-
695 Logger.LogTrace("DisposeAndNullControllers");
- -
697 {
- -
699 if (!releaseServers)
- -
701 }
-
702 }
+
680
+ +
686
+
+ +
693 {
+
694 Logger.LogTrace("DisposeAndNullControllers");
+ +
696 {
+ +
698 if (!releaseServers)
+ +
700 }
+
701 }
-
703
- -
709
- - -
718 CancellationToken cancellationToken);
-
719
-
-
726 protected async ValueTask BeforeApplyDmb(Models.CompileJob newCompileJob, CancellationToken cancellationToken)
-
727 {
- -
729 {
-
730 Logger.LogTrace("Same compile job, not sending deployment event");
-
731 return;
-
732 }
-
733
- -
735 metadata,
- -
737
- -
739 EventType.DeploymentActivation,
-
740 new List<string?>
-
741 {
-
742 GameIOManager.ResolvePath(newCompileJob.DirectoryName!.Value.ToString()),
-
743 },
-
744 false,
- -
746
-
747 try
-
748 {
- -
750 }
-
751 catch (Exception ex)
-
752 {
-
753 Logger.LogWarning(ex, "Failed to apply remote deployment!");
-
754 }
-
755
- -
757 }
+
702
+ +
708
+ + +
717 CancellationToken cancellationToken);
+
718
+
+
725 protected async ValueTask BeforeApplyDmb(Models.CompileJob newCompileJob, CancellationToken cancellationToken)
+
726 {
+ +
728 {
+
729 Logger.LogTrace("Same compile job, not sending deployment event");
+
730 return;
+
731 }
+
732
+ +
734 metadata,
+ +
736
+ +
738 EventType.DeploymentActivation,
+
739 new List<string?>
+
740 {
+
741 GameIOManager.ResolvePath(newCompileJob.DirectoryName!.Value.ToString()),
+
742 },
+
743 false,
+ +
745
+
746 try
+
747 {
+ +
749 }
+
750 catch (Exception ex)
+
751 {
+
752 Logger.LogWarning(ex, "Failed to apply remote deployment!");
+
753 }
+
754
+ +
756 }
-
758
-
- -
768 {
-
769 try
-
770 {
-
771 var sessionEventTask = relayToSession ? ((IEventConsumer)this).HandleEvent(eventType, parameters, false, cancellationToken) : ValueTask.CompletedTask;
- - - - -
776 }
-
777 catch (JobException ex)
-
778 {
-
779 Logger.LogError(ex, "Suppressing exception triggered by event!");
-
780 }
-
781 }
+
757
+
+ +
767 {
+
768 try
+
769 {
+
770 var sessionEventTask = relayToSession ? ((IEventConsumer)this).HandleEvent(eventType, parameters, false, cancellationToken) : ValueTask.CompletedTask;
+ + + + +
775 }
+
776 catch (JobException ex)
+
777 {
+
778 Logger.LogError(ex, "Suppressing exception triggered by event!");
+
779 }
+
780 }
-
782
-
- -
789 {
-
790 Logger.LogTrace("Monitor restart!");
-
791
- -
793
-
794 for (var retryAttempts = 1; ; ++retryAttempts)
-
795 {
-
796 Status = WatchdogStatus.Restoring;
- - -
799 try
-
800 {
-
801 // use LaunchImplNoLock without announcements or restarting the monitor
-
802 await LaunchNoLock(false, false, false, null, cancellationToken);
-
803 Status = WatchdogStatus.Online;
-
804 Logger.LogDebug("Relaunch successful, resuming monitor...");
-
805 return;
-
806 }
- -
808 {
- -
810 }
-
811
-
812 Logger.LogWarning(launchException, "Failed to automatically restart the watchdog! Attempt: {attemptNumber}", retryAttempts);
-
813 Status = WatchdogStatus.DelayedRestart;
-
814
-
815 var retryDelay = Math.Min(
-
816 Convert.ToInt32(
-
817 Math.Pow(2, retryAttempts)),
-
818 TimeSpan.FromHours(1).TotalSeconds); // max of one hour, increasing by a power of 2 each time
-
819
- -
821 $"Failed to restart (Attempt: {retryAttempts}), retrying in {retryDelay}s...");
-
822
- -
824 TimeSpan.FromSeconds(retryDelay),
- -
826 }
-
827 }
+
781
+
+ +
788 {
+
789 Logger.LogTrace("Monitor restart!");
+
790
+ +
792
+
793 for (var retryAttempts = 1; ; ++retryAttempts)
+
794 {
+
795 Status = WatchdogStatus.Restoring;
+ + +
798 try
+
799 {
+
800 // use LaunchImplNoLock without announcements or restarting the monitor
+
801 await LaunchNoLock(false, false, false, null, cancellationToken);
+
802 Status = WatchdogStatus.Online;
+
803 Logger.LogDebug("Relaunch successful, resuming monitor...");
+
804 return;
+
805 }
+ +
807 {
+ +
809 }
+
810
+
811 Logger.LogWarning(launchException, "Failed to automatically restart the watchdog! Attempt: {attemptNumber}", retryAttempts);
+
812 Status = WatchdogStatus.DelayedRestart;
+
813
+
814 var retryDelay = Math.Min(
+
815 Convert.ToInt32(
+
816 Math.Pow(2, retryAttempts)),
+
817 TimeSpan.FromHours(1).TotalSeconds); // max of one hour, increasing by a power of 2 each time
+
818
+ +
820 $"Failed to restart (Attempt: {retryAttempts}), retrying in {retryDelay}s...");
+
821
+ +
823 TimeSpan.FromSeconds(retryDelay),
+ +
825 }
+
826 }
-
828
-
- -
835 {
- -
837
- - -
840 {
-
841 Logger.LogDebug("Found new CompileJob without waiting");
-
842 return;
-
843 }
-
844
- -
846 }
+
827
+
+ +
834 {
+ +
836
+ + +
839 {
+
840 Logger.LogDebug("Found new CompileJob without waiting");
+
841 return;
+
842 }
+
843
+ +
845 }
-
847
-
853#pragma warning disable CA1502
-
- -
855 {
-
856 Logger.LogTrace("Entered MonitorLifetimes");
-
857 Status = WatchdogStatus.Online;
-
858 using var cancellationTokenLoggingRegistration = cancellationToken.Register(() => Logger.LogTrace("Monitor cancellationToken triggered"));
-
859
-
860 // this function is responsible for calling HandlerMonitorWakeup when necessary and manitaining the MonitorState
-
861 try
-
862 {
- -
864 Task? activeServerLifetime = null,
-
865 activeServerReboot = null,
-
866 activeServerStartup = null,
-
867 serverPrimed = null,
- -
869 newDmbAvailable = null,
-
870 healthCheck = null;
- -
872 var ranInitialDmbCheck = false;
-
873 for (ulong iteration = 1; nextAction != MonitorAction.Exit; ++iteration)
- -
875 {
-
876 var nextMonitorWakeupTcs = new TaskCompletionSource();
-
877 try
-
878 {
-
879 Logger.LogTrace("Iteration {iteration} of monitor loop", iteration);
-
880 nextAction = MonitorAction.Continue;
-
881
- -
883
- -
885 {
- - -
888 {
-
889 if (sameController && oldTask?.IsCompleted == true)
-
890 return;
-
891
- -
893 }
-
894
-
895 controller!.RebootGate = nextMonitorWakeupTcs.Task;
-
896
- - - - -
901
-
902 if (!sameController)
- -
904
- - - -
908 () =>
-
909 {
- - - -
913 ranInitialDmbCheck = true;
-
914 return result;
-
915 });
-
916 }
-
917
-
918 if (controller != null)
-
919 {
- -
921
- - - - -
926 : Task.Delay(
-
927 TimeSpan.FromSeconds(healthCheckSeconds),
- -
929
-
930 // cancel waiting if requested
-
931 var toWaitOn = Task.WhenAny(
- - - - - - -
938 serverPrimed!);
-
939
-
940 // wait for something to happen
- -
942 }
-
943 else
-
944 {
-
945 Logger.LogError("Controller was null on monitor wakeup! Attempting restart...");
-
946 nextAction = MonitorAction.Restart; // excuse me wtf?
-
947 }
-
948
-
949 cancellationToken.ThrowIfCancellationRequested();
-
950 Logger.LogTrace("Monitor activated");
-
951
-
952 // always run HandleMonitorWakeup from the context of the semaphore lock
- -
954 {
-
955 // Set this sooner so chat sends don't hold us up
- -
957 Status = WatchdogStatus.Restoring;
-
958
-
959 // multiple things may have happened, handle them one at a time
- -
961 {
-
962 MonitorActivationReason activationReason = default; // this will always be assigned before being used
-
963
- -
965 {
-
966 var taskCompleted = task?.IsCompleted == true;
-
967 task = null;
-
968 if (nextAction == MonitorAction.Skip)
-
969 nextAction = MonitorAction.Continue;
-
970 else if (taskCompleted)
-
971 {
- -
973 return true;
-
974 }
-
975
-
976 return false;
-
977 }
-
978
-
979 // process the tasks in this order and call HandlerMonitorWakup for each depending on the new monitorState
- - - - - - - -
987
- -
989
-
990 if (!anyActivation)
- -
992 else
-
993 {
-
994 Logger.LogTrace("Reason: {activationReason}", activationReason);
-
995 if (activationReason == MonitorActivationReason.HealthCheck)
- - -
998 else
- - - -
1002 }
-
1003 }
-
1004 }
-
1005
-
1006 Logger.LogTrace("Next monitor action is to {nextAction}", nextAction);
-
1007
-
1008 // Restart if requested
-
1009 if (nextAction == MonitorAction.Restart)
-
1010 {
- -
1012 nextAction = MonitorAction.Continue;
-
1013 }
-
1014 }
- -
1016 {
-
1017 // really, this should NEVER happen
-
1018 Logger.LogError(
-
1019 e,
-
1020 "Monitor crashed! Iteration: {iteration}",
-
1021 iteration);
-
1022
- -
1024 ? "Recovering"
-
1025 : "Shutting down";
- -
1027 $"Monitor crashed, this should NEVER happen! Please report this, full details in logs! {nextActionMessage}. Error: {e.Message}");
-
1028
-
1029 if (disposed)
- -
1031 else if (nextAction != MonitorAction.Exit)
-
1032 {
-
1033 if (GetActiveController()?.Lifetime.IsCompleted != true)
- -
1035 else
-
1036 Logger.LogDebug("Server seems to be okay, not restarting");
-
1037 nextAction = MonitorAction.Continue;
-
1038 }
-
1039 }
-
1040 finally
-
1041 {
-
1042 nextMonitorWakeupTcs.SetResult();
-
1043 }
-
1044 }
-
1045 }
- -
1047 {
-
1048 // stop signal
-
1049 Logger.LogDebug("Monitor cancelled");
-
1050
-
1051 if (releaseServers)
-
1052 {
-
1053 Logger.LogTrace("Detaching server...");
- -
1055 if (controller != null)
-
1056 await controller.Release();
-
1057 else
-
1058 Logger.LogError("Controller was null on monitor shutdown!");
-
1059 }
-
1060 }
-
1061
-
1062 // DCT: Operation must always run
-
1063 await DisposeAndNullControllers(CancellationToken.None);
-
1064 Status = WatchdogStatus.Offline;
-
1065
-
1066 Logger.LogTrace("Monitor exiting...");
-
1067 }
+
846
+
852#pragma warning disable CA1502
+
+ +
854 {
+
855 Logger.LogTrace("Entered MonitorLifetimes");
+
856 Status = WatchdogStatus.Online;
+
857 using var cancellationTokenLoggingRegistration = cancellationToken.Register(() => Logger.LogTrace("Monitor cancellationToken triggered"));
+
858
+
859 // this function is responsible for calling HandlerMonitorWakeup when necessary and manitaining the MonitorState
+
860 try
+
861 {
+ +
863 Task? activeServerLifetime = null,
+
864 activeServerReboot = null,
+
865 activeServerStartup = null,
+
866 serverPrimed = null,
+ +
868 newDmbAvailable = null,
+
869 healthCheck = null;
+ +
871 var ranInitialDmbCheck = false;
+
872 for (ulong iteration = 1; nextAction != MonitorAction.Exit; ++iteration)
+ +
874 {
+
875 var nextMonitorWakeupTcs = new TaskCompletionSource();
+
876 try
+
877 {
+
878 Logger.LogTrace("Iteration {iteration} of monitor loop", iteration);
+
879 nextAction = MonitorAction.Continue;
+
880
+ +
882
+ +
884 {
+ + +
887 {
+
888 if (sameController && oldTask?.IsCompleted == true)
+
889 return;
+
890
+ +
892 }
+
893
+
894 controller!.RebootGate = nextMonitorWakeupTcs.Task;
+
895
+ + + + +
900
+
901 if (!sameController)
+ +
903
+ + + +
907 () =>
+
908 {
+ + + +
912 ranInitialDmbCheck = true;
+
913 return result;
+
914 });
+
915 }
+
916
+
917 if (controller != null)
+
918 {
+ +
920
+ + + + +
925 : Task.Delay(
+
926 TimeSpan.FromSeconds(healthCheckSeconds),
+ +
928
+
929 // cancel waiting if requested
+
930 var toWaitOn = Task.WhenAny(
+ + + + + + +
937 serverPrimed!);
+
938
+
939 // wait for something to happen
+ +
941 }
+
942 else
+
943 {
+
944 Logger.LogError("Controller was null on monitor wakeup! Attempting restart...");
+
945 nextAction = MonitorAction.Restart; // excuse me wtf?
+
946 }
+
947
+
948 cancellationToken.ThrowIfCancellationRequested();
+
949 Logger.LogTrace("Monitor activated");
+
950
+
951 // always run HandleMonitorWakeup from the context of the semaphore lock
+ +
953 {
+
954 // Set this sooner so chat sends don't hold us up
+ +
956 Status = WatchdogStatus.Restoring;
+
957
+
958 // multiple things may have happened, handle them one at a time
+ +
960 {
+
961 MonitorActivationReason activationReason = default; // this will always be assigned before being used
+
962
+ +
964 {
+
965 var taskCompleted = task?.IsCompleted == true;
+
966 task = null;
+
967 if (nextAction == MonitorAction.Skip)
+
968 nextAction = MonitorAction.Continue;
+
969 else if (taskCompleted)
+
970 {
+ +
972 return true;
+
973 }
+
974
+
975 return false;
+
976 }
+
977
+
978 // process the tasks in this order and call HandlerMonitorWakup for each depending on the new monitorState
+ + + + + + + +
986
+ +
988
+
989 if (!anyActivation)
+ +
991 else
+
992 {
+
993 Logger.LogTrace("Reason: {activationReason}", activationReason);
+
994 if (activationReason == MonitorActivationReason.HealthCheck)
+ + +
997 else
+ + + +
1001 }
+
1002 }
+
1003 }
+
1004
+
1005 Logger.LogTrace("Next monitor action is to {nextAction}", nextAction);
+
1006
+
1007 // Restart if requested
+
1008 if (nextAction == MonitorAction.Restart)
+
1009 {
+ +
1011 nextAction = MonitorAction.Continue;
+
1012 }
+
1013 }
+ +
1015 {
+
1016 // really, this should NEVER happen
+
1017 Logger.LogError(
+
1018 e,
+
1019 "Monitor crashed! Iteration: {iteration}",
+
1020 iteration);
+
1021
+ +
1023 ? "Recovering"
+
1024 : "Shutting down";
+ +
1026 $"Monitor crashed, this should NEVER happen! Please report this, full details in logs! {nextActionMessage}. Error: {e.Message}");
+
1027
+
1028 if (disposed)
+ +
1030 else if (nextAction != MonitorAction.Exit)
+
1031 {
+
1032 if (GetActiveController()?.Lifetime.IsCompleted != true)
+ +
1034 else
+
1035 Logger.LogDebug("Server seems to be okay, not restarting");
+
1036 nextAction = MonitorAction.Continue;
+
1037 }
+
1038 }
+
1039 finally
+
1040 {
+
1041 nextMonitorWakeupTcs.SetResult();
+
1042 }
+
1043 }
+
1044 }
+ +
1046 {
+
1047 // stop signal
+
1048 Logger.LogDebug("Monitor cancelled");
+
1049
+
1050 if (releaseServers)
+
1051 {
+
1052 Logger.LogTrace("Detaching server...");
+ +
1054 if (controller != null)
+
1055 await controller.Release();
+
1056 else
+
1057 Logger.LogError("Controller was null on monitor shutdown!");
+
1058 }
+
1059 }
+
1060
+
1061 // DCT: Operation must always run
+
1062 await DisposeAndNullControllers(CancellationToken.None);
+
1063 Status = WatchdogStatus.Offline;
+
1064
+
1065 Logger.LogTrace("Monitor exiting...");
+
1066 }
-
1068#pragma warning restore CA1502
-
1069
-
- -
1078 {
-
1079 if (Status == WatchdogStatus.Offline)
-
1080 return;
-
1081 if (!graceful)
-
1082 {
- - -
1085 ? EventType.WatchdogDetach
-
1086 : EventType.WatchdogShutdown,
-
1087 Enumerable.Empty<string>(),
- - -
1090
-
1091 if (announce)
-
1092 Chat.QueueWatchdogMessage("Shutting down...");
-
1093
- -
1095
- -
1097
-
1098 LastLaunchParameters = null;
-
1099 return;
-
1100 }
-
1101
-
1102 // merely set the reboot state
- -
1104 if (toKill != null)
-
1105 {
-
1106 await toKill.SetRebootState(Session.RebootState.Shutdown, cancellationToken);
-
1107 Logger.LogTrace("Graceful termination requested");
-
1108 }
-
1109 else
-
1110 Logger.LogTrace("Could not gracefully terminate as there is no active controller!");
-
1111 }
+
1067#pragma warning restore CA1502
+
1068
+
+ +
1077 {
+
1078 if (Status == WatchdogStatus.Offline)
+
1079 return;
+
1080 if (!graceful)
+
1081 {
+ + +
1084 ? EventType.WatchdogDetach
+
1085 : EventType.WatchdogShutdown,
+
1086 Enumerable.Empty<string>(),
+ + +
1089
+
1090 if (announce)
+
1091 Chat.QueueWatchdogMessage("Shutting down...");
+
1092
+ +
1094
+ +
1096
+
1097 LastLaunchParameters = null;
+
1098 return;
+
1099 }
+
1100
+
1101 // merely set the reboot state
+ +
1103 if (toKill != null)
+
1104 {
+
1105 await toKill.SetRebootState(Session.RebootState.Shutdown, cancellationToken);
+
1106 Logger.LogTrace("Graceful termination requested");
+
1107 }
+
1108 else
+
1109 Logger.LogTrace("Could not gracefully terminate as there is no active controller!");
+
1110 }
-
1112
-
- -
1119 {
-
1120 Logger.LogTrace("Sending health check to active server...");
- -
1122 if (activeServer == null)
-
1123 return MonitorAction.Restart; // uhhhh???
-
1124
- -
1126
-
1127 var shouldShutdown = activeServer.RebootState == Session.RebootState.Shutdown;
-
1128 if (response == null)
-
1129 {
-
1130 switch (++healthChecksMissed)
-
1131 {
-
1132 case 1:
-
1133 Logger.LogDebug("DEFCON 4: Game server missed first health check!");
-
1134 break;
-
1135 case 2:
-
1136 const string message2 = "DEFCON 3: Game server has missed 2 health checks!";
-
1137 Logger.LogInformation(message2);
- -
1139 break;
-
1140 case 3:
- -
1142 ? "shutdown"
-
1143 : "be restarted";
-
1144 const string logTemplate1 = "DEFCON 2: Game server has missed 3 health checks! If it does not respond to the next one, the watchdog will {actionToTake}!";
-
1145 Logger.LogWarning(logTemplate1, actionToTake);
- -
1147 logTemplate1.Replace(
-
1148 "{actionToTake}",
- -
1150 StringComparison.Ordinal));
-
1151 break;
-
1152 case 4:
- -
1154 ? "Shutting down due to graceful termination request"
-
1155 : "Restarting";
-
1156 const string logTemplate2 = "DEFCON 1: Four health checks have been missed! {actionTaken}...";
-
1157 Logger.LogWarning(logTemplate2, actionTaken);
- -
1159 logTemplate2.Replace(
-
1160 "{actionTaken}",
- -
1162 StringComparison.Ordinal));
-
1163
- -
1165 {
-
1166 Logger.LogDebug("DumpOnHealthCheckRestart enabled.");
-
1167 try
-
1168 {
- -
1170 }
-
1171 catch (JobException ex)
-
1172 {
-
1173 Logger.LogWarning(ex, "Creating dump failed!");
-
1174 }
-
1175 catch (Win32Exception ex)
-
1176 {
-
1177 Logger.LogWarning(ex, "Creating dump failed!");
-
1178 }
-
1179 }
-
1180 else
-
1181 Logger.LogTrace("DumpOnHealthCheckRestart disabled.");
-
1182
- - -
1185 default:
-
1186 Logger.LogError("Invalid health checks missed count: {healthChecksMissed}", healthChecksMissed);
-
1187 break;
-
1188 }
-
1189 }
-
1190 else
-
1191 {
- -
1193 ClientCount = response.ClientCount;
-
1194 }
-
1195
-
1196 return MonitorAction.Continue;
-
1197 }
+
1111
+
+ +
1118 {
+
1119 Logger.LogTrace("Sending health check to active server...");
+ +
1121 if (activeServer == null)
+
1122 return MonitorAction.Restart; // uhhhh???
+
1123
+ +
1125
+
1126 var shouldShutdown = activeServer.RebootState == Session.RebootState.Shutdown;
+
1127 if (response == null)
+
1128 {
+
1129 switch (++healthChecksMissed)
+
1130 {
+
1131 case 1:
+
1132 Logger.LogDebug("DEFCON 4: Game server missed first health check!");
+
1133 break;
+
1134 case 2:
+
1135 const string message2 = "DEFCON 3: Game server has missed 2 health checks!";
+
1136 Logger.LogInformation(message2);
+ +
1138 break;
+
1139 case 3:
+ +
1141 ? "shutdown"
+
1142 : "be restarted";
+
1143 const string logTemplate1 = "DEFCON 2: Game server has missed 3 health checks! If it does not respond to the next one, the watchdog will {actionToTake}!";
+
1144 Logger.LogWarning(logTemplate1, actionToTake);
+ +
1146 logTemplate1.Replace(
+
1147 "{actionToTake}",
+ +
1149 StringComparison.Ordinal));
+
1150 break;
+
1151 case 4:
+ +
1153 ? "Shutting down due to graceful termination request"
+
1154 : "Restarting";
+
1155 const string logTemplate2 = "DEFCON 1: Four health checks have been missed! {actionTaken}...";
+
1156 Logger.LogWarning(logTemplate2, actionTaken);
+ +
1158 logTemplate2.Replace(
+
1159 "{actionTaken}",
+ +
1161 StringComparison.Ordinal));
+
1162
+ +
1164 {
+
1165 Logger.LogDebug("DumpOnHealthCheckRestart enabled.");
+
1166 try
+
1167 {
+ +
1169 }
+
1170 catch (JobException ex)
+
1171 {
+
1172 Logger.LogWarning(ex, "Creating dump failed!");
+
1173 }
+
1174 catch (Win32Exception ex)
+
1175 {
+
1176 Logger.LogWarning(ex, "Creating dump failed!");
+
1177 }
+
1178 }
+
1179 else
+
1180 Logger.LogTrace("DumpOnHealthCheckRestart disabled.");
+
1181
+ + +
1184 default:
+
1185 Logger.LogError("Invalid health checks missed count: {healthChecksMissed}", healthChecksMissed);
+
1186 break;
+
1187 }
+
1188 }
+
1189 else
+
1190 {
+ +
1192 ClientCount = response.ClientCount;
+
1193 }
+
1194
+
1195 return MonitorAction.Continue;
+
1196 }
-
1198
-
- -
1204 {
-
1205 if (result?.ChatResponses != null)
-
1206 {
- -
1208 foreach (var response in result.ChatResponses
-
1209 .Where(response =>
-
1210 {
-
1211 if (response.ChannelIds == null)
-
1212 {
-
1213 if (!warnedMissingChannelIds)
-
1214 {
-
1215 Logger.LogWarning("DMAPI response contains null channelIds!");
-
1216 warnedMissingChannelIds = true;
-
1217 }
-
1218
-
1219 return false;
-
1220 }
-
1221
-
1222 return true;
-
1223 }))
- -
1225 response,
-
1226 response.ChannelIds!
-
1227 .Select(channelIdString =>
-
1228 {
- -
1230 return (ulong?)channelId;
-
1231 else
-
1232 Logger.LogWarning("Could not parse chat response channel ID: {channelID}", channelIdString);
-
1233
-
1234 return null;
-
1235 })
- -
1237 .Select(nullableChannelId => nullableChannelId!.Value));
-
1238 }
-
1239 }
+
1197
+
+ +
1203 {
+
1204 if (result?.ChatResponses != null)
+
1205 {
+ +
1207 foreach (var response in result.ChatResponses
+
1208 .Where(response =>
+
1209 {
+
1210 if (response.ChannelIds == null)
+
1211 {
+
1212 if (!warnedMissingChannelIds)
+
1213 {
+
1214 Logger.LogWarning("DMAPI response contains null channelIds!");
+
1215 warnedMissingChannelIds = true;
+
1216 }
+
1217
+
1218 return false;
+
1219 }
+
1220
+
1221 return true;
+
1222 }))
+ +
1224 response,
+
1225 response.ChannelIds!
+
1226 .Select(channelIdString =>
+
1227 {
+ +
1229 return (ulong?)channelId;
+
1230 else
+
1231 Logger.LogWarning("Could not parse chat response channel ID: {channelID}", channelIdString);
+
1232
+
1233 return null;
+
1234 })
+ +
1236 .Select(nullableChannelId => nullableChannelId!.Value));
+
1237 }
+
1238 }
-
1240
-
- -
1247 {
-
1248 const string DumpDirectory = "ProcessDumps";
-
1249
-
1250 var session = GetActiveController();
-
1251 if (session?.Lifetime.IsCompleted != false)
-
1252 throw new JobException(ErrorCode.GameServerOffline);
-
1253
-
1254 var dumpFileExtension = session.DumpFileExtension;
-
1255
-
1256 var dumpFileNameTemplate = diagnosticsIOManager.ResolvePath(
-
1257 diagnosticsIOManager.ConcatPath(
- -
1259 $"DreamDaemon-{DateTimeOffset.UtcNow.ToFileStamp()}"));
-
1260
-
1261 var dumpFileName = $"{dumpFileNameTemplate}{dumpFileExtension}";
-
1262 var iteration = 0;
-
1263 while (await diagnosticsIOManager.FileExists(dumpFileName, cancellationToken))
-
1264 dumpFileName = $"{dumpFileNameTemplate} ({++iteration}){dumpFileExtension}";
-
1265
-
1266 if (iteration == 0)
-
1267 await diagnosticsIOManager.CreateDirectory(DumpDirectory, cancellationToken);
-
1268
-
1269 if (session.Lifetime.IsCompleted)
-
1270 throw new JobException(ErrorCode.GameServerOffline);
-
1271
-
1272 Logger.LogInformation("Dumping session to {dumpFileName}...", dumpFileName);
-
1273 await session.CreateDump(dumpFileName, ActiveLaunchParameters.Minidumps!.Value, cancellationToken);
-
1274 }
+
1239
+
+ +
1246 {
+
1247 const string DumpDirectory = "ProcessDumps";
+
1248
+
1249 var session = GetActiveController();
+
1250 if (session?.Lifetime.IsCompleted != false)
+
1251 throw new JobException(ErrorCode.GameServerOffline);
+
1252
+
1253 var dumpFileExtension = session.DumpFileExtension;
+
1254
+
1255 var dumpFileNameTemplate = diagnosticsIOManager.ResolvePath(
+
1256 diagnosticsIOManager.ConcatPath(
+ +
1258 $"DreamDaemon-{DateTimeOffset.UtcNow.ToFileStamp()}"));
+
1259
+
1260 var dumpFileName = $"{dumpFileNameTemplate}{dumpFileExtension}";
+
1261 var iteration = 0;
+
1262 while (await diagnosticsIOManager.FileExists(dumpFileName, cancellationToken))
+
1263 dumpFileName = $"{dumpFileNameTemplate} ({++iteration}){dumpFileExtension}";
+
1264
+
1265 if (iteration == 0)
+
1266 await diagnosticsIOManager.CreateDirectory(DumpDirectory, cancellationToken);
+
1267
+
1268 if (session.Lifetime.IsCompleted)
+
1269 throw new JobException(ErrorCode.GameServerOffline);
+
1270
+
1271 Logger.LogInformation("Dumping session to {dumpFileName}...", dumpFileName);
+
1272 await session.CreateDump(dumpFileName, ActiveLaunchParameters.Minidumps!.Value, cancellationToken);
+
1273 }
-
1275 }
+
1274 }
-
1276}
+
1275}
virtual ? long Id
The ID of the entity.
Definition EntityId.cs:13
@@ -1229,67 +1228,67 @@ $(document).ready(function() { init_codefold(0); });
async ValueTask< ReattachInformation?> Load(CancellationToken cancellationToken)
Load a saved ReattachInformation.A ValueTask<TResult> resulting in the stored ReattachInformation if ...
ValueTask Clear(CancellationToken cancellationToken)
Clear any stored ReattachInformation.A ValueTask representing the running operation.
- -
async ValueTask HandleRestart(Version? updateVersion, bool handlerMayDelayShutdownWithExtremelyLongRunningTasks, CancellationToken cancellationToken)
Handle a restart of the server.A ValueTask representing the running operation.
-
async ValueTask< bool > Broadcast(string message, CancellationToken cancellationToken)
Send a broadcast message to the DMAPI.A ValueTask<TResult> resulting in true if the broadcast succee...
-
async ValueTask< MonitorAction > HandleHealthCheck(CancellationToken cancellationToken)
Handles a watchdog health check.
+ +
async ValueTask HandleRestart(Version? updateVersion, bool handlerMayDelayShutdownWithExtremelyLongRunningTasks, CancellationToken cancellationToken)
Handle a restart of the server.A ValueTask representing the running operation.
+
async ValueTask< bool > Broadcast(string message, CancellationToken cancellationToken)
Send a broadcast message to the DMAPI.A ValueTask<TResult> resulting in true if the broadcast succee...
+
async ValueTask< MonitorAction > HandleHealthCheck(CancellationToken cancellationToken)
Handles a watchdog health check.
ISessionController? GetActiveController()
Get the active ISessionController.
-
readonly IJobManager jobManager
The IJobManager for the WatchdogBase.
-
WatchdogBase(IChatManager chat, ISessionControllerFactory sessionControllerFactory, IDmbFactory dmbFactory, ISessionPersistor sessionPersistor, IJobManager jobManager, IServerControl serverControl, IAsyncDelayer asyncDelayer, IIOManager diagnosticsIOManager, IEventConsumer eventConsumer, IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory, IIOManager gameIOManager, ILogger< WatchdogBase > logger, DreamDaemonLaunchParameters initialLaunchParameters, Api.Models.Instance metadata, bool autoStart)
Initializes a new instance of the WatchdogBase class.
-
ILogger< WatchdogBase > Logger
The ILogger for the WatchdogBase.
-
bool releaseServers
If the servers should be released instead of shutdown.
-
async ValueTask ReattachFailure(CancellationToken cancellationToken)
Call from InitController(ValueTask, ReattachInformation, CancellationToken) when a reattach operation...
-
async ValueTask CreateDumpNoLock(CancellationToken cancellationToken)
Attempt to create a process dump for the game server. Requires a lock on synchronizationSemaphore.
-
Models.? CompileJob ActiveCompileJob
Retrieves the Models.CompileJob currently running on the server.
-
DreamDaemonLaunchParameters? LastLaunchParameters
The DreamDaemonLaunchParameters the active server is using.This may not be the exact same as ActiveLa...
-
DateTimeOffset? LaunchTime
When the current server executions was started.
-
readonly bool autoStart
If the WatchdogBase should LaunchNoLock(bool, bool, bool, ReattachInformation, CancellationToken) in ...
-
async ValueTask Terminate(bool graceful, CancellationToken cancellationToken)
Stops the watchdog.A ValueTask representing the running operation.
-
async ValueTask CheckLaunchResult(ISessionController controller, string serverName, CancellationToken cancellationToken)
Check the LaunchResult of a given controller for errors and throw a JobException if any are detected...
-
readonly Api.Models.Instance metadata
The Api.Models.Instance for the WatchdogBase.
-
bool AlphaIsActive
If the alpha server is the active server.
-
readonly IEventConsumer eventConsumer
The IEventConsumer that is not the WatchdogBase.
-
bool disposed
If the WatchdogBase has been DisposeAsync'd.
-
readonly SemaphoreSlim controllerDisposeSemaphore
SemaphoreSlim used for DisposeAndNullControllers.
-
WatchdogStatus Status
The current WatchdogStatus.
+
readonly IJobManager jobManager
The IJobManager for the WatchdogBase.
+
WatchdogBase(IChatManager chat, ISessionControllerFactory sessionControllerFactory, IDmbFactory dmbFactory, ISessionPersistor sessionPersistor, IJobManager jobManager, IServerControl serverControl, IAsyncDelayer asyncDelayer, IIOManager diagnosticsIOManager, IEventConsumer eventConsumer, IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory, IIOManager gameIOManager, ILogger< WatchdogBase > logger, DreamDaemonLaunchParameters initialLaunchParameters, Api.Models.Instance metadata, bool autoStart)
Initializes a new instance of the WatchdogBase class.
+
ILogger< WatchdogBase > Logger
The ILogger for the WatchdogBase.
+
bool releaseServers
If the servers should be released instead of shutdown.
+
async ValueTask ReattachFailure(CancellationToken cancellationToken)
Call from InitController(ValueTask, ReattachInformation, CancellationToken) when a reattach operation...
+
async ValueTask CreateDumpNoLock(CancellationToken cancellationToken)
Attempt to create a process dump for the game server. Requires a lock on synchronizationSemaphore.
+
Models.? CompileJob ActiveCompileJob
Retrieves the Models.CompileJob currently running on the server.
+
DreamDaemonLaunchParameters? LastLaunchParameters
The DreamDaemonLaunchParameters the active server is using.This may not be the exact same as ActiveLa...
+
DateTimeOffset? LaunchTime
When the current server executions was started.
+
readonly bool autoStart
If the WatchdogBase should LaunchNoLock(bool, bool, bool, ReattachInformation, CancellationToken) in ...
+
async ValueTask Terminate(bool graceful, CancellationToken cancellationToken)
Stops the watchdog.A ValueTask representing the running operation.
+
async ValueTask CheckLaunchResult(ISessionController controller, string serverName, CancellationToken cancellationToken)
Check the LaunchResult of a given controller for errors and throw a JobException if any are detected...
+
readonly Api.Models.Instance metadata
The Api.Models.Instance for the WatchdogBase.
+
bool AlphaIsActive
If the alpha server is the active server.
+
readonly IEventConsumer eventConsumer
The IEventConsumer that is not the WatchdogBase.
+
bool disposed
If the WatchdogBase has been DisposeAsync'd.
+
readonly SemaphoreSlim controllerDisposeSemaphore
SemaphoreSlim used for DisposeAndNullControllers.
+
WatchdogStatus Status
The current WatchdogStatus.
ValueTask< MonitorAction > HandleMonitorWakeup(MonitorActivationReason activationReason, CancellationToken cancellationToken)
Handles the actions to take when the monitor has to "wake up".
-
CancellationTokenSource? monitorCts
The CancellationTokenSource for the monitor loop.
-
Task? monitorTask
The Task running the monitor loop.
- -
readonly IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory
The IRemoteDeploymentManagerFactory for the WatchdogBase.
-
readonly SemaphoreSlim synchronizationSemaphore
The SemaphoreSlim for the WatchdogBase.
-
async ValueTask Restart(bool graceful, CancellationToken cancellationToken)
Restarts the watchdog.A ValueTask representing the running operation.
-
long? MemoryUsage
Gets the memory usage of the game server in bytes.
-
readonly IIOManager diagnosticsIOManager
The IIOManager pointing to the Diagnostics directory.
-
async ValueTask< MessageContent > HandleChatCommand(string commandName, string arguments, ChatUser sender, CancellationToken cancellationToken)
Handle a chat command.A ValueTask<TResult> resulting in the MessageContent text to send back.
+
CancellationTokenSource? monitorCts
The CancellationTokenSource for the monitor loop.
+
Task? monitorTask
The Task running the monitor loop.
+ +
readonly IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory
The IRemoteDeploymentManagerFactory for the WatchdogBase.
+
readonly SemaphoreSlim synchronizationSemaphore
The SemaphoreSlim for the WatchdogBase.
+
async ValueTask Restart(bool graceful, CancellationToken cancellationToken)
Restarts the watchdog.A ValueTask representing the running operation.
+
long? MemoryUsage
Gets the memory usage of the game server in bytes.
+
readonly IIOManager diagnosticsIOManager
The IIOManager pointing to the Diagnostics directory.
+
async ValueTask< MessageContent > HandleChatCommand(string commandName, string arguments, ChatUser sender, CancellationToken cancellationToken)
Handle a chat command.A ValueTask<TResult> resulting in the MessageContent text to send back.
ValueTask InitController(ValueTask eventTask, ReattachInformation? reattachInfo, CancellationToken cancellationToken)
Starts all ISessionControllers.
-
async ValueTask CreateDump(CancellationToken cancellationToken)
Attempt to create a process dump for DreamDaemon.A ValueTask representing the running operation.
-
IIOManager GameIOManager
The IIOManager for the WatchdogBase pointing to the Game directory.
-
DreamDaemonLaunchParameters ActiveLaunchParameters
The DreamDaemonLaunchParameters to be applied.
-
uint? ClientCount
Last known client count queried from the DMAPI. Requires health checks to be enabled to populate.
-
async ValueTask BeforeApplyDmb(Models.CompileJob newCompileJob, CancellationToken cancellationToken)
To be called before a given newCompileJob goes live.
-
async ValueTask< bool > StopMonitor()
Stops MonitorLifetimes(CancellationToken). Doesn't kill the servers.
-
async ValueTask MonitorRestart(CancellationToken cancellationToken)
Attempt to restart the monitor from scratch.
-
async ValueTask Launch(CancellationToken cancellationToken)
Start the IWatchdog.A ValueTask representing the running operation.
-
async Task InitialCheckDmbUpdated(CompileJob currentCompileJob)
Check for a new IDmbProvider.
-
async ValueTask LaunchNoLock(bool startMonitor, bool announce, bool announceFailure, ReattachInformation? reattachInfo, CancellationToken cancellationToken)
Launches the watchdog.
-
async ValueTask DisposeAndNullControllers(CancellationToken cancellationToken)
Wrapper for DisposeAndNullControllersImpl under a locked context.
+
async ValueTask CreateDump(CancellationToken cancellationToken)
Attempt to create a process dump for DreamDaemon.A ValueTask representing the running operation.
+
IIOManager GameIOManager
The IIOManager for the WatchdogBase pointing to the Game directory.
+
DreamDaemonLaunchParameters ActiveLaunchParameters
The DreamDaemonLaunchParameters to be applied.
+
uint? ClientCount
Last known client count queried from the DMAPI. Requires health checks to be enabled to populate.
+
async ValueTask BeforeApplyDmb(Models.CompileJob newCompileJob, CancellationToken cancellationToken)
To be called before a given newCompileJob goes live.
+
async ValueTask< bool > StopMonitor()
Stops MonitorLifetimes(CancellationToken). Doesn't kill the servers.
+
async ValueTask MonitorRestart(CancellationToken cancellationToken)
Attempt to restart the monitor from scratch.
+
async ValueTask Launch(CancellationToken cancellationToken)
Start the IWatchdog.A ValueTask representing the running operation.
+
async Task InitialCheckDmbUpdated(CompileJob currentCompileJob)
Check for a new IDmbProvider.
+
async ValueTask LaunchNoLock(bool startMonitor, bool announce, bool announceFailure, ReattachInformation? reattachInfo, CancellationToken cancellationToken)
Launches the watchdog.
+
async ValueTask DisposeAndNullControllers(CancellationToken cancellationToken)
Wrapper for DisposeAndNullControllersImpl under a locked context.
ValueTask DisposeAndNullControllersImpl()
Call IDisposable.Dispose and null the fields for all ISessionControllers.
-
async ValueTask TerminateNoLock(bool graceful, bool announce, CancellationToken cancellationToken)
Implementation of Terminate(bool, CancellationToken). Does not lock synchronizationSemaphore.
-
async ValueTask< bool > ChangeSettings(DreamDaemonLaunchParameters launchParameters, CancellationToken cancellationToken)
Changes the ActiveLaunchParameters. If currently running, may trigger a graceful restart....
-
void HandleChatResponses(TopicResponse? result)
Handle any TopicResponse.ChatResponses in a given topic result .
-
virtual async ValueTask ResetRebootState(CancellationToken cancellationToken)
Cancels pending graceful actions.A ValueTask representing the running operation.
-
async Task MonitorLifetimes(CancellationToken cancellationToken)
The main loop of the watchdog. Ayschronously waits for events to occur and then responds to them.
-
long? SessionId
An incrementing ID for representing current server execution.
-
async Task StartAsync(CancellationToken cancellationToken)
+
async ValueTask TerminateNoLock(bool graceful, bool announce, CancellationToken cancellationToken)
Implementation of Terminate(bool, CancellationToken). Does not lock synchronizationSemaphore.
+
async ValueTask< bool > ChangeSettings(DreamDaemonLaunchParameters launchParameters, CancellationToken cancellationToken)
Changes the ActiveLaunchParameters. If currently running, may trigger a graceful restart....
+
void HandleChatResponses(TopicResponse? result)
Handle any TopicResponse.ChatResponses in a given topic result .
+
virtual async ValueTask ResetRebootState(CancellationToken cancellationToken)
Cancels pending graceful actions.A ValueTask representing the running operation.
+
async Task MonitorLifetimes(CancellationToken cancellationToken)
The main loop of the watchdog. Ayschronously waits for events to occur and then responds to them.
+
long? SessionId
An incrementing ID for representing current server execution.
+
async Task StartAsync(CancellationToken cancellationToken)
ValueTask InstanceRenamed(string newInstanceName, CancellationToken cancellationToken)
Called when the owning Instance is renamed.A ValueTask representing the running operation.
-
int healthChecksMissed
The number of hearbeats missed.
-
IChatManager Chat
The IChatManager for the WatchdogBase.
+
int healthChecksMissed
The number of hearbeats missed.
+
IChatManager Chat
The IChatManager for the WatchdogBase.
async Task StopAsync(CancellationToken cancellationToken)
-
readonly IRestartRegistration restartRegistration
The IRestartRegistration for the WatchdogBase.
-
async ValueTask HandleEventImpl(EventType eventType, IEnumerable< string > parameters, bool relayToSession, CancellationToken cancellationToken)
Handle a given eventType without re-throwing errors.
-
WatchdogStatus status
Backing field for Status.
-
volatile TaskCompletionSource activeParametersUpdated
TaskCompletionSource that completes when ActiveLaunchParameters are changed and we are running.
+
readonly IRestartRegistration restartRegistration
The IRestartRegistration for the WatchdogBase.
+
async ValueTask HandleEventImpl(EventType eventType, IEnumerable< string > parameters, bool relayToSession, CancellationToken cancellationToken)
Handle a given eventType without re-throwing errors.
+
WatchdogStatus status
Backing field for Status.
+
volatile TaskCompletionSource activeParametersUpdated
TaskCompletionSource that completes when ActiveLaunchParameters are changed and we are running.
Operation exceptions thrown from the context of a Models.Job.
diff --git a/_windows_filesystem_link_factory_8cs_source.html b/_windows_filesystem_link_factory_8cs_source.html index 8c5da4c5eb..bd5370e456 100644 --- a/_windows_filesystem_link_factory_8cs_source.html +++ b/_windows_filesystem_link_factory_8cs_source.html @@ -83,60 +83,59 @@ $(document).ready(function() { init_codefold(0); });
Go to the documentation of this file.
1using System;
-
2using System.IO;
-
3using System.Threading;
-
4using System.Threading.Tasks;
-
5
-
6using BetterWin32Errors;
-
7
- -
9
- -
11{
-
- -
16 {
- -
19
-
21 public Task CreateHardLink(string targetPath, string linkPath, CancellationToken cancellationToken)
-
22 => throw new NotSupportedException();
-
23
-
25 public Task CreateSymbolicLink(string targetPath, string linkPath, CancellationToken cancellationToken) => Task.Factory.StartNew(
-
26 () =>
-
27 {
-
28 ArgumentNullException.ThrowIfNull(targetPath);
-
29 ArgumentNullException.ThrowIfNull(linkPath);
-
30
-
31 // check if its not a file
-
32 var flags = File.Exists(targetPath) ? NativeMethods.CreateSymbolicLinkFlags.None : NativeMethods.CreateSymbolicLinkFlags.Directory;
-
33
-
34 /*
-
35 * no don't fucking use this
-
36 * sure it works in SOME cases
-
37 * i.e. win10 1803+ and IN DEVELOPER MODE
-
38 * other times it throws ERROR_INVALID_PARAMETER
-
39 * but the fucking worst is there are some configurations of windows that accept the argument and allow the function to succeed
-
40 * BUT IT DOESN'T CREATE THE FUCKING LINK
-
41 * I AM NOT DEBUGGING THAT SHIT AGAIN AHHH
-
42
-
43 flags |= NativeMethods.CreateSymbolicLinkFlags.AllowUnprivilegedCreate;
-
44 */
-
45
-
46 cancellationToken.ThrowIfCancellationRequested();
-
47 if (!NativeMethods.CreateSymbolicLink(linkPath, targetPath, flags))
-
48 throw new Win32Exception();
-
49 },
-
50 cancellationToken,
- -
52 TaskScheduler.Current);
-
53 }
+
2using System.ComponentModel;
+
3using System.IO;
+
4using System.Threading;
+
5using System.Threading.Tasks;
+
6
+ +
8
+ +
10{
+
+ +
15 {
+ +
18
+
20 public Task CreateHardLink(string targetPath, string linkPath, CancellationToken cancellationToken)
+
21 => throw new NotSupportedException();
+
22
+
24 public Task CreateSymbolicLink(string targetPath, string linkPath, CancellationToken cancellationToken) => Task.Factory.StartNew(
+
25 () =>
+
26 {
+
27 ArgumentNullException.ThrowIfNull(targetPath);
+
28 ArgumentNullException.ThrowIfNull(linkPath);
+
29
+
30 // check if its not a file
+
31 var flags = File.Exists(targetPath) ? NativeMethods.CreateSymbolicLinkFlags.None : NativeMethods.CreateSymbolicLinkFlags.Directory;
+
32
+
33 /*
+
34 * no don't fucking use this
+
35 * sure it works in SOME cases
+
36 * i.e. win10 1803+ and IN DEVELOPER MODE
+
37 * other times it throws ERROR_INVALID_PARAMETER
+
38 * but the fucking worst is there are some configurations of windows that accept the argument and allow the function to succeed
+
39 * BUT IT DOESN'T CREATE THE FUCKING LINK
+
40 * I AM NOT DEBUGGING THAT SHIT AGAIN AHHH
+
41
+
42 flags |= NativeMethods.CreateSymbolicLinkFlags.AllowUnprivilegedCreate;
+
43 */
+
44
+
45 cancellationToken.ThrowIfCancellationRequested();
+
46 if (!NativeMethods.CreateSymbolicLink(linkPath, targetPath, flags))
+
47 throw new Win32Exception();
+
48 },
+
49 cancellationToken,
+ +
51 TaskScheduler.Current);
+
52 }
-
54}
+
53}
IIOManager that resolves paths to Environment.CurrentDirectory.
const TaskCreationOptions BlockingTaskCreationOptions
The TaskCreationOptions used to spawn Tasks for potentially long running, blocking operations.
- + - +
Native methods used by the code.
CreateSymbolicLinkFlags
See https://docs.microsoft.com/en-us/windows/desktop/api/winbase/nf-winbase-createsymboliclinka#param...
diff --git a/_windows_network_prompt_reaper_8cs_source.html b/_windows_network_prompt_reaper_8cs_source.html index 25e9d36960..f31eadcf03 100644 --- a/_windows_network_prompt_reaper_8cs_source.html +++ b/_windows_network_prompt_reaper_8cs_source.html @@ -84,178 +84,177 @@ $(document).ready(function() { init_codefold(0); });
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
-
3using System.Linq;
-
4using System.Runtime.InteropServices;
-
5using System.Text;
-
6using System.Threading;
-
7using System.Threading.Tasks;
-
8
-
9using BetterWin32Errors;
-
10
-
11using Microsoft.Extensions.Hosting;
-
12using Microsoft.Extensions.Logging;
-
13
- -
15
- -
17{
-
- -
20 {
-
24 const int SendMessageCount = 5;
-
25
-
29 const int RecheckDelayMs = 250;
-
30
- -
35
-
39 readonly ILogger<WindowsNetworkPromptReaper> logger;
-
40
-
44 readonly List<IProcess> registeredProcesses;
-
45
-
-
52 static bool EnumWindow(IntPtr hWnd, IntPtr lParam)
-
53 {
-
54 var gcChildhandlesList = GCHandle.FromIntPtr(lParam);
-
55
-
56 if (gcChildhandlesList.Target == null)
-
57 return false;
-
58
-
59 var childHandles = (List<IntPtr>)gcChildhandlesList.Target;
-
60 childHandles.Add(hWnd);
-
61
-
62 return true;
-
63 }
+
3using System.ComponentModel;
+
4using System.Linq;
+
5using System.Runtime.InteropServices;
+
6using System.Text;
+
7using System.Threading;
+
8using System.Threading.Tasks;
+
9
+
10using Microsoft.Extensions.Hosting;
+
11using Microsoft.Extensions.Logging;
+
12
+ +
14
+ +
16{
+
+ +
19 {
+
23 const int SendMessageCount = 5;
+
24
+
28 const int RecheckDelayMs = 250;
+
29
+ +
34
+
38 readonly ILogger<WindowsNetworkPromptReaper> logger;
+
39
+
43 readonly List<IProcess> registeredProcesses;
+
44
+
+
51 static bool EnumWindow(IntPtr hWnd, IntPtr lParam)
+
52 {
+
53 var gcChildhandlesList = GCHandle.FromIntPtr(lParam);
+
54
+
55 if (gcChildhandlesList.Target == null)
+
56 return false;
+
57
+
58 var childHandles = (List<IntPtr>)gcChildhandlesList.Target;
+
59 childHandles.Add(hWnd);
+
60
+
61 return true;
+
62 }
-
64
-
-
70 static List<IntPtr> GetAllChildHandles(IntPtr mainWindow)
-
71 {
-
72 var childHandles = new List<IntPtr>();
-
73 var gcChildhandlesList = GCHandle.Alloc(childHandles);
-
74 try
-
75 {
-
76 var pointerChildHandlesList = GCHandle.ToIntPtr(gcChildhandlesList);
-
77 NativeMethods.EnumWindowProc childProc = new(EnumWindow);
-
78 NativeMethods.EnumChildWindows(mainWindow, childProc, pointerChildHandlesList);
-
79 }
-
80 finally
-
81 {
-
82 gcChildhandlesList.Free();
-
83 }
-
84
-
85 return childHandles;
-
86 }
+
63
+
+
69 static List<IntPtr> GetAllChildHandles(IntPtr mainWindow)
+
70 {
+
71 var childHandles = new List<IntPtr>();
+
72 var gcChildhandlesList = GCHandle.Alloc(childHandles);
+
73 try
+
74 {
+
75 var pointerChildHandlesList = GCHandle.ToIntPtr(gcChildhandlesList);
+
76 NativeMethods.EnumWindowProc childProc = new(EnumWindow);
+
77 NativeMethods.EnumChildWindows(mainWindow, childProc, pointerChildHandlesList);
+
78 }
+
79 finally
+
80 {
+
81 gcChildhandlesList.Free();
+
82 }
+
83
+
84 return childHandles;
+
85 }
-
87
-
-
93 public WindowsNetworkPromptReaper(IAsyncDelayer asyncDelayer, ILogger<WindowsNetworkPromptReaper> logger)
-
94 {
-
95 this.asyncDelayer = asyncDelayer ?? throw new ArgumentNullException(nameof(asyncDelayer));
-
96 this.logger = logger ?? throw new ArgumentNullException(nameof(logger));
-
97
-
98 registeredProcesses = new List<IProcess>();
-
99 }
+
86
+
+
92 public WindowsNetworkPromptReaper(IAsyncDelayer asyncDelayer, ILogger<WindowsNetworkPromptReaper> logger)
+
93 {
+
94 this.asyncDelayer = asyncDelayer ?? throw new ArgumentNullException(nameof(asyncDelayer));
+
95 this.logger = logger ?? throw new ArgumentNullException(nameof(logger));
+
96
+
97 registeredProcesses = new List<IProcess>();
+
98 }
-
100
-
-
102 public void RegisterProcess(IProcess process)
-
103 {
-
104 ArgumentNullException.ThrowIfNull(process);
-
105
- -
107 {
-
108 if (registeredProcesses.Contains(process))
-
109 throw new InvalidOperationException("This process has already been registered for network prompt reaping!");
-
110 logger.LogTrace("Registering process {pid}...", process.Id);
-
111 registeredProcesses.Add(process);
-
112 }
-
113
-
114 process.Lifetime.ContinueWith(
-
115 x =>
-
116 {
-
117 logger.LogTrace("Unregistering process {pid}...", process.Id);
- -
119 registeredProcesses.Remove(process);
-
120 },
-
121 TaskScheduler.Current);
-
122 }
+
99
+
+
101 public void RegisterProcess(IProcess process)
+
102 {
+
103 ArgumentNullException.ThrowIfNull(process);
+
104
+ +
106 {
+
107 if (registeredProcesses.Contains(process))
+
108 throw new InvalidOperationException("This process has already been registered for network prompt reaping!");
+
109 logger.LogTrace("Registering process {pid}...", process.Id);
+
110 registeredProcesses.Add(process);
+
111 }
+
112
+
113 process.Lifetime.ContinueWith(
+
114 x =>
+
115 {
+
116 logger.LogTrace("Unregistering process {pid}...", process.Id);
+ +
118 registeredProcesses.Remove(process);
+
119 },
+
120 TaskScheduler.Current);
+
121 }
-
123
-
-
125 protected override async Task ExecuteAsync(CancellationToken cancellationToken)
-
126 {
-
127 logger.LogDebug("Starting network prompt reaper...");
-
128 try
-
129 {
-
130 while (!cancellationToken.IsCancellationRequested)
-
131 {
-
132 await asyncDelayer.Delay(TimeSpan.FromMilliseconds(RecheckDelayMs), cancellationToken);
-
133
-
134 IntPtr window;
-
135 int processId;
- -
137 {
-
138 if (registeredProcesses.Count == 0)
-
139 continue;
-
140
-
141 window = NativeMethods.FindWindow(null, "Network Accessibility");
-
142 if (window == IntPtr.Zero)
-
143 continue;
-
144
-
145 // found a bitch
-
146 var threadId = NativeMethods.GetWindowThreadProcessId(window, out processId);
-
147 if (!registeredProcesses.Any(x => x.Id == processId))
-
148 continue; // not our bitch
-
149 }
-
150
-
151 logger.LogTrace("Identified \"Network Accessibility\" window in owned process {pid}", processId);
-
152
-
153 var found = false;
-
154 foreach (var childHandle in GetAllChildHandles(window))
-
155 {
-
156 const int MaxLength = 10;
-
157 var stringBuilder = new StringBuilder(MaxLength + 1);
-
158
-
159 if (NativeMethods.GetWindowText(childHandle, stringBuilder, MaxLength) == 0)
-
160 {
-
161 logger.LogWarning(new Win32Exception(), "Error calling GetWindowText!");
-
162 continue;
-
163 }
-
164
-
165 var windowText = stringBuilder.ToString();
-
166 if (windowText == "Yes")
-
167 {
-
168 // smash_button_meme.jpg
-
169 logger.LogTrace("Sending \"Yes\" button clicks...");
-
170 for (var iteration = 0; iteration < SendMessageCount; ++iteration)
-
171 {
-
172 const int BM_CLICK = 0x00F5;
-
173 var result = NativeMethods.SendMessage(childHandle, BM_CLICK, IntPtr.Zero, IntPtr.Zero);
-
174 }
-
175
-
176 found = true;
-
177 break;
-
178 }
-
179 }
-
180
-
181 if (!found)
-
182 logger.LogDebug("Unable to find \"Yes\" button for \"Network Accessibility\" window in owned process {pid}!", processId);
-
183 }
-
184 }
-
185 catch (OperationCanceledException ex)
-
186 {
-
187 logger.LogTrace(ex, "Cancelled!");
-
188 }
-
189 finally
-
190 {
-
191 registeredProcesses.Clear();
-
192 logger.LogTrace("Exiting network prompt reaper...");
-
193 }
-
194 }
+
122
+
+
124 protected override async Task ExecuteAsync(CancellationToken cancellationToken)
+
125 {
+
126 logger.LogDebug("Starting network prompt reaper...");
+
127 try
+
128 {
+
129 while (!cancellationToken.IsCancellationRequested)
+
130 {
+
131 await asyncDelayer.Delay(TimeSpan.FromMilliseconds(RecheckDelayMs), cancellationToken);
+
132
+
133 IntPtr window;
+
134 int processId;
+ +
136 {
+
137 if (registeredProcesses.Count == 0)
+
138 continue;
+
139
+
140 window = NativeMethods.FindWindow(null, "Network Accessibility");
+
141 if (window == IntPtr.Zero)
+
142 continue;
+
143
+
144 // found a bitch
+
145 var threadId = NativeMethods.GetWindowThreadProcessId(window, out processId);
+
146 if (!registeredProcesses.Any(x => x.Id == processId))
+
147 continue; // not our bitch
+
148 }
+
149
+
150 logger.LogTrace("Identified \"Network Accessibility\" window in owned process {pid}", processId);
+
151
+
152 var found = false;
+
153 foreach (var childHandle in GetAllChildHandles(window))
+
154 {
+
155 const int MaxLength = 10;
+
156 var stringBuilder = new StringBuilder(MaxLength + 1);
+
157
+
158 if (NativeMethods.GetWindowText(childHandle, stringBuilder, MaxLength) == 0)
+
159 {
+
160 logger.LogWarning(new Win32Exception(), "Error calling GetWindowText!");
+
161 continue;
+
162 }
+
163
+
164 var windowText = stringBuilder.ToString();
+
165 if (windowText == "Yes")
+
166 {
+
167 // smash_button_meme.jpg
+
168 logger.LogTrace("Sending \"Yes\" button clicks...");
+
169 for (var iteration = 0; iteration < SendMessageCount; ++iteration)
+
170 {
+
171 const int BM_CLICK = 0x00F5;
+
172 var result = NativeMethods.SendMessage(childHandle, BM_CLICK, IntPtr.Zero, IntPtr.Zero);
+
173 }
+
174
+
175 found = true;
+
176 break;
+
177 }
+
178 }
+
179
+
180 if (!found)
+
181 logger.LogDebug("Unable to find \"Yes\" button for \"Network Accessibility\" window in owned process {pid}!", processId);
+
182 }
+
183 }
+
184 catch (OperationCanceledException ex)
+
185 {
+
186 logger.LogTrace(ex, "Cancelled!");
+
187 }
+
188 finally
+
189 {
+
190 registeredProcesses.Clear();
+
191 logger.LogTrace("Exiting network prompt reaper...");
+
192 }
+
193 }
-
195 }
+
194 }
-
196}
+
195}
Native methods used by the code.
static int GetWindowThreadProcessId(IntPtr hWnd, out int lpdwProcessId)
See https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-getwindowthreadprocessid.
@@ -263,17 +262,17 @@ $(document).ready(function() { init_codefold(0); });
static IntPtr FindWindow(string? lpClassName, string lpWindowName)
See https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-findwindoww.
static int SendMessage(IntPtr hWnd, int wMsg, IntPtr wParam, IntPtr lParam)
See https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-sendmessage.
static int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount)
See https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-getwindowtextw.
- -
readonly ILogger< WindowsNetworkPromptReaper > logger
The ILogger for the WindowsNetworkPromptReaper.
-
readonly IAsyncDelayer asyncDelayer
The IAsyncDelayer for the WindowsNetworkPromptReaper.
-
void RegisterProcess(IProcess process)
Register a given process for network prompt reaping.
-
WindowsNetworkPromptReaper(IAsyncDelayer asyncDelayer, ILogger< WindowsNetworkPromptReaper > logger)
Initializes a new instance of the WindowsNetworkPromptReaper class.
-
const int SendMessageCount
Number of times to send the button click message. Should be at least 2 or it may fail to focus the wi...
-
static bool EnumWindow(IntPtr hWnd, IntPtr lParam)
Callback for NativeMethods.EnumChildWindows(IntPtr, NativeMethods.EnumWindowProc, IntPtr).
-
const int RecheckDelayMs
Check for prompts each time this amount of milliseconds pass.
-
static List< IntPtr > GetAllChildHandles(IntPtr mainWindow)
Get all the child windows handles of a given mainWindow .
-
override async Task ExecuteAsync(CancellationToken cancellationToken)
-
readonly List< IProcess > registeredProcesses
The list of IProcesss registered.
+ +
readonly ILogger< WindowsNetworkPromptReaper > logger
The ILogger for the WindowsNetworkPromptReaper.
+
readonly IAsyncDelayer asyncDelayer
The IAsyncDelayer for the WindowsNetworkPromptReaper.
+
void RegisterProcess(IProcess process)
Register a given process for network prompt reaping.
+
WindowsNetworkPromptReaper(IAsyncDelayer asyncDelayer, ILogger< WindowsNetworkPromptReaper > logger)
Initializes a new instance of the WindowsNetworkPromptReaper class.
+
const int SendMessageCount
Number of times to send the button click message. Should be at least 2 or it may fail to focus the wi...
+
static bool EnumWindow(IntPtr hWnd, IntPtr lParam)
Callback for NativeMethods.EnumChildWindows(IntPtr, NativeMethods.EnumWindowProc, IntPtr).
+
const int RecheckDelayMs
Check for prompts each time this amount of milliseconds pass.
+
static List< IntPtr > GetAllChildHandles(IntPtr mainWindow)
Get all the child windows handles of a given mainWindow .
+
override async Task ExecuteAsync(CancellationToken cancellationToken)
+
readonly List< IProcess > registeredProcesses
The list of IProcesss registered.
On Windows, DreamDaemon will show an unskippable prompt when using /world/proc/OpenPort()....
Task< int?> Lifetime
The Task<TResult> resulting in the exit code of the process or null if the process was detached.
Abstraction over a global::System.Diagnostics.Process.
Definition IProcess.cs:11
diff --git a/_windows_process_features_8cs_source.html b/_windows_process_features_8cs_source.html index f99d9710b1..08341f09cd 100644 --- a/_windows_process_features_8cs_source.html +++ b/_windows_process_features_8cs_source.html @@ -84,15 +84,15 @@ $(document).ready(function() { init_codefold(0); });
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
-
3using System.Diagnostics;
-
4using System.IO;
-
5using System.Linq;
-
6using System.Management;
-
7using System.Runtime.Versioning;
-
8using System.Threading;
-
9using System.Threading.Tasks;
-
10
-
11using BetterWin32Errors;
+
3using System.ComponentModel;
+
4using System.Diagnostics;
+
5using System.IO;
+
6using System.Linq;
+
7using System.Management;
+
8using System.Runtime.Versioning;
+
9using System.Threading;
+
10using System.Threading.Tasks;
+
11
12using Microsoft.Extensions.Logging;
13
diff --git a/_windows_watchdog_8cs_source.html b/_windows_watchdog_8cs_source.html index 7edab13208..c00a7989b5 100644 --- a/_windows_watchdog_8cs_source.html +++ b/_windows_watchdog_8cs_source.html @@ -170,13 +170,13 @@ $(document).ready(function() { init_codefold(0); });
A IWatchdog that, instead of killing servers for updates, uses the wonders of filesystem links to swa...
IFilesystemLinkFactory LinkFactory
The IFilesystemLinkFactory for the AdvancedWatchdog.
-
readonly IJobManager jobManager
The IJobManager for the WatchdogBase.
-
ILogger< WatchdogBase > Logger
The ILogger for the WatchdogBase.
-
readonly bool autoStart
If the WatchdogBase should LaunchNoLock(bool, bool, bool, ReattachInformation, CancellationToken) in ...
-
readonly IEventConsumer eventConsumer
The IEventConsumer that is not the WatchdogBase.
-
readonly IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory
The IRemoteDeploymentManagerFactory for the WatchdogBase.
-
readonly IIOManager diagnosticsIOManager
The IIOManager pointing to the Diagnostics directory.
-
IIOManager GameIOManager
The IIOManager for the WatchdogBase pointing to the Game directory.
+
readonly IJobManager jobManager
The IJobManager for the WatchdogBase.
+
ILogger< WatchdogBase > Logger
The ILogger for the WatchdogBase.
+
readonly bool autoStart
If the WatchdogBase should LaunchNoLock(bool, bool, bool, ReattachInformation, CancellationToken) in ...
+
readonly IEventConsumer eventConsumer
The IEventConsumer that is not the WatchdogBase.
+
readonly IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory
The IRemoteDeploymentManagerFactory for the WatchdogBase.
+
readonly IIOManager diagnosticsIOManager
The IIOManager pointing to the Diagnostics directory.
+
IIOManager GameIOManager
The IIOManager for the WatchdogBase pointing to the Game directory.
A variant of the AdvancedWatchdog that works on Windows systems.
WindowsWatchdog(IChatManager chat, ISessionControllerFactory sessionControllerFactory, IDmbFactory dmbFactory, ISessionPersistor sessionPersistor, IJobManager jobManager, IServerControl serverControl, IAsyncDelayer asyncDelayer, IIOManager diagnosticsIOManager, IEventConsumer eventConsumer, IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory, IIOManager gameIOManager, IFilesystemLinkFactory linkFactory, ILogger< WindowsWatchdog > logger, DreamDaemonLaunchParameters initialLaunchParameters, Api.Models.Instance instance, bool autoStart)
Initializes a new instance of the WindowsWatchdog class.
override SwappableDmbProvider CreateSwappableDmbProvider(IDmbProvider dmbProvider)
diff --git a/changelog.yml b/changelog.yml index 5b18d007c4..05060befc6 100644 --- a/changelog.yml +++ b/changelog.yml @@ -183,8 +183,8 @@ Components: InteropApi: 5.10.0 HostWatchdog: 1.6.0 NugetCommon: 7.0.0 - NugetApi: 16.3.0 - NugetClient: 19.3.0 + NugetApi: 17.0.0 + NugetClient: 20.0.0 WebControlPanel: 6.4.0 Changes: - Descriptions: @@ -220,6 +220,10 @@ Components: - Released artifacts are now attested. Author: Cyberboss PullRequest: 2000 + - Descriptions: + - Fixed the colouring of the icon for TGS on Windows. + Author: Cyberboss + PullRequest: 2028 Unreleased: true - Version: 6.11.5 ComponentVersions: diff --git a/class_tgstation_1_1_server_1_1_api_1_1_models_1_1_engine_version.html b/class_tgstation_1_1_server_1_1_api_1_1_models_1_1_engine_version.html index 11ebb8b627..6d241540b3 100644 --- a/class_tgstation_1_1_server_1_1_api_1_1_models_1_1_engine_version.html +++ b/class_tgstation_1_1_server_1_1_api_1_1_models_1_1_engine_version.html @@ -714,7 +714,7 @@ Here is the caller graph for this function:

Definition at line 24 of file EngineVersion.cs.

24{ get; set; }
-

Referenced by Tgstation.Server.Host.Components.Watchdog.WindowsWatchdog.ApplyInitialDmb(), Tgstation.Server.Host.Components.Engine.ByondInstallation.ByondInstallation(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.CanUseSwappableDmbProvider(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ChangeSettings(), Tgstation.Server.Host.Components.Engine.EngineManager.CheckVersionParameter(), Tgstation.Server.Host.Components.Engine.EngineInstallerBase.CheckVersionValidity(), Tgstation.Server.Host.Components.Engine.DelegatingEngineInstaller.DelegateCall< TReturn >(), Tgstation.Server.Api.Models.EngineVersion.EngineVersion(), Tgstation.Server.Api.Models.EngineVersion.Equals(), Tgstation.Server.Host.Components.Chat.Commands.EngineCommand.Invoke(), Tgstation.Server.Host.Components.Session.SessionControllerFactory.LaunchNew(), Tgstation.Server.Host.Components.Engine.OpenDreamInstallation.OpenDreamInstallation(), Tgstation.Server.Host.Components.Session.SessionController.ProcessBridgeCommand(), Tgstation.Server.Host.Components.Chat.Providers.IrcProvider.SendUpdateMessage(), Tgstation.Server.Api.Models.EngineVersion.ToString(), and Tgstation.Server.Api.Models.EngineVersion.TryParse().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WindowsWatchdog.ApplyInitialDmb(), Tgstation.Server.Host.Components.Engine.ByondInstallation.ByondInstallation(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.CanUseSwappableDmbProvider(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ChangeSettings(), Tgstation.Server.Host.Components.Engine.EngineManager.CheckVersionParameter(), Tgstation.Server.Host.Components.Engine.EngineInstallerBase.CheckVersionValidity(), Tgstation.Server.Host.Components.Engine.DelegatingEngineInstaller.DelegateCall< TReturn >(), Tgstation.Server.Api.Models.EngineVersion.EngineVersion(), Tgstation.Server.Api.Models.EngineVersion.Equals(), Tgstation.Server.Host.Components.Chat.Commands.EngineCommand.Invoke(), Tgstation.Server.Host.Components.Session.SessionControllerFactory.LaunchNew(), Tgstation.Server.Host.Components.Engine.OpenDreamInstallation.OpenDreamInstallation(), Tgstation.Server.Host.Components.Session.SessionController.ProcessBridgeCommand(), Tgstation.Server.Host.Components.Chat.Providers.IrcProvider.SendUpdateMessage(), Tgstation.Server.Api.Models.EngineVersion.ToString(), and Tgstation.Server.Api.Models.EngineVersion.TryParse().

diff --git a/class_tgstation_1_1_server_1_1_api_1_1_models_1_1_entity_id.html b/class_tgstation_1_1_server_1_1_api_1_1_models_1_1_entity_id.html index 5da94bd9bb..2d9ea42442 100644 --- a/class_tgstation_1_1_server_1_1_api_1_1_models_1_1_entity_id.html +++ b/class_tgstation_1_1_server_1_1_api_1_1_models_1_1_entity_id.html @@ -192,7 +192,7 @@ Properties

Definition at line 13 of file EntityId.cs.

13{ get; set; }
-

Referenced by Tgstation.Server.Host.Authority.LoginAuthority.AttemptLogin(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.BeforeApplyDmb(), Tgstation.Server.Host.Jobs.JobService.CancelJob(), Tgstation.Server.Host.Controllers.ChatController.Create(), Tgstation.Server.Host.Controllers.RepositoryController.Create(), Tgstation.Server.Client.InstanceManagerClient.CreateClient(), Tgstation.Server.Host.Components.Deployment.DeploymentLockManager.CreateLock(), Tgstation.Server.Api.Models.UserName.CreateUserName< TResultType >(), Tgstation.Server.Host.Controllers.RepositoryController.Delete(), Tgstation.Server.Host.Controllers.InstancePermissionSetController.Delete(), Tgstation.Server.Host.Controllers.JobController.Delete(), Tgstation.Server.Host.Components.Deployment.DeploymentLockManager.DeploymentLockManager(), Tgstation.Server.Host.Components.Deployment.DmbFactory.FromCompileJobInternal(), Tgstation.Server.Host.Authority.UserAuthority.GetId(), Tgstation.Server.Host.Controllers.ChatController.GetId(), Tgstation.Server.Host.Controllers.InstancePermissionSetController.GetId(), Tgstation.Server.Host.Controllers.JobController.GetId(), Tgstation.Server.Host.Controllers.UserController.GetId(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.HandleNewDmbAvailable(), Tgstation.Server.Host.Controllers.ApiController.HookExecuteAction(), Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.InitController(), Tgstation.Server.Client.Components.InstanceClient.InstanceClient(), Tgstation.Server.Host.Models.Job.Job(), Tgstation.Server.Host.Models.Job.Job(), Tgstation.Server.Host.Components.Session.SessionControllerFactory.LaunchNew(), Tgstation.Server.Host.Controllers.ChatController.List(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.PerformDmbSwap(), Tgstation.Server.Host.Controllers.DreamMakerController.Read(), Tgstation.Server.Host.Controllers.RepositoryController.Read(), Tgstation.Server.Client.Components.ConfigurationClient.Read(), Tgstation.Server.Host.Controllers.DreamDaemonController.ReadImpl(), Tgstation.Server.Host.Components.Session.SessionControllerFactory.Reattach(), Tgstation.Server.Host.Controllers.RepositoryController.Reclone(), Tgstation.Server.Host.Jobs.JobService.RegisterOperation(), Tgstation.Server.Host.Jobs.JobService.RunJob(), Tgstation.Server.Client.Components.EngineClient.SetActiveVersion(), Tgstation.Server.Host.GraphQL.Mutations.UserMutations.SetCurrentOAuthConnections(), Tgstation.Server.Host.GraphQL.Mutations.UserMutations.SetCurrentUserPassword(), Tgstation.Server.Host.Models.ChatBot.ToApi(), Tgstation.Server.Host.Models.CompileJob.ToApi(), Tgstation.Server.Host.Models.Instance.ToApi(), Tgstation.Server.Host.Models.Job.ToApi(), Tgstation.Server.Host.Models.UserGroup.ToApi(), Tgstation.Server.Host.Controllers.ChatController.Update(), Tgstation.Server.Host.Controllers.DreamDaemonController.Update(), Tgstation.Server.Host.Controllers.DreamMakerController.Update(), Tgstation.Server.Host.Controllers.EngineController.Update(), Tgstation.Server.Host.Controllers.InstancePermissionSetController.Update(), Tgstation.Server.Host.Controllers.RepositoryController.Update(), Tgstation.Server.Host.Jobs.JobsHubGroupMapper.UserDisabled(), and Tgstation.Server.Client.Components.ConfigurationClient.Write().

+

Referenced by Tgstation.Server.Host.Authority.LoginAuthority.AttemptLogin(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.BeforeApplyDmb(), Tgstation.Server.Host.Jobs.JobService.CancelJob(), Tgstation.Server.Host.Controllers.ChatController.Create(), Tgstation.Server.Host.Controllers.RepositoryController.Create(), Tgstation.Server.Client.InstanceManagerClient.CreateClient(), Tgstation.Server.Host.Components.Deployment.DeploymentLockManager.CreateLock(), Tgstation.Server.Api.Models.UserName.CreateUserName< TResultType >(), Tgstation.Server.Host.Controllers.RepositoryController.Delete(), Tgstation.Server.Host.Controllers.InstancePermissionSetController.Delete(), Tgstation.Server.Host.Controllers.JobController.Delete(), Tgstation.Server.Host.Components.Deployment.DeploymentLockManager.DeploymentLockManager(), Tgstation.Server.Host.Components.Deployment.DmbFactory.FromCompileJobInternal(), Tgstation.Server.Host.Authority.UserAuthority.GetId(), Tgstation.Server.Host.Controllers.ChatController.GetId(), Tgstation.Server.Host.Controllers.InstancePermissionSetController.GetId(), Tgstation.Server.Host.Controllers.JobController.GetId(), Tgstation.Server.Host.Controllers.UserController.GetId(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.HandleNewDmbAvailable(), Tgstation.Server.Host.Controllers.ApiController.HookExecuteAction(), Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.InitController(), Tgstation.Server.Client.Components.InstanceClient.InstanceClient(), Tgstation.Server.Host.Models.Job.Job(), Tgstation.Server.Host.Models.Job.Job(), Tgstation.Server.Host.Components.Session.SessionControllerFactory.LaunchNew(), Tgstation.Server.Host.Controllers.ChatController.List(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.PerformDmbSwap(), Tgstation.Server.Host.Controllers.DreamMakerController.Read(), Tgstation.Server.Host.Controllers.RepositoryController.Read(), Tgstation.Server.Client.Components.ConfigurationClient.Read(), Tgstation.Server.Host.Controllers.DreamDaemonController.ReadImpl(), Tgstation.Server.Host.Components.Session.SessionControllerFactory.Reattach(), Tgstation.Server.Host.Controllers.RepositoryController.Reclone(), Tgstation.Server.Host.Jobs.JobService.RegisterOperation(), Tgstation.Server.Host.Jobs.JobService.RunJob(), Tgstation.Server.Client.Components.EngineClient.SetActiveVersion(), Tgstation.Server.Host.GraphQL.Mutations.UserMutations.SetCurrentOAuthConnections(), Tgstation.Server.Host.GraphQL.Mutations.UserMutations.SetCurrentUserPassword(), Tgstation.Server.Host.Models.ChatBot.ToApi(), Tgstation.Server.Host.Models.CompileJob.ToApi(), Tgstation.Server.Host.Models.Instance.ToApi(), Tgstation.Server.Host.Models.Job.ToApi(), Tgstation.Server.Host.Models.UserGroup.ToApi(), Tgstation.Server.Host.Controllers.ChatController.Update(), Tgstation.Server.Host.Controllers.DreamDaemonController.Update(), Tgstation.Server.Host.Controllers.DreamMakerController.Update(), Tgstation.Server.Host.Controllers.EngineController.Update(), Tgstation.Server.Host.Controllers.InstancePermissionSetController.Update(), Tgstation.Server.Host.Controllers.RepositoryController.Update(), Tgstation.Server.Host.Jobs.JobsHubGroupMapper.UserDisabled(), and Tgstation.Server.Client.Components.ConfigurationClient.Write().

diff --git a/class_tgstation_1_1_server_1_1_api_1_1_models_1_1_internal_1_1_dream_daemon_launch_parameters.html b/class_tgstation_1_1_server_1_1_api_1_1_models_1_1_internal_1_1_dream_daemon_launch_parameters.html index 098d95819f..7a06417ab9 100644 --- a/class_tgstation_1_1_server_1_1_api_1_1_models_1_1_internal_1_1_dream_daemon_launch_parameters.html +++ b/class_tgstation_1_1_server_1_1_api_1_1_models_1_1_internal_1_1_dream_daemon_launch_parameters.html @@ -311,7 +311,7 @@ Properties

Definition at line 76 of file DreamDaemonLaunchParameters.cs.

76{ get; set; }
-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleHealthCheck().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleHealthCheck().

@@ -340,7 +340,7 @@ Properties

Definition at line 69 of file DreamDaemonLaunchParameters.cs.

69{ get; set; }
-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes().

diff --git a/class_tgstation_1_1_server_1_1_common_1_1_extensions_1_1_value_task_extensions.html b/class_tgstation_1_1_server_1_1_common_1_1_extensions_1_1_value_task_extensions.html index e3e36d7b24..b710cb3f68 100644 --- a/class_tgstation_1_1_server_1_1_common_1_1_extensions_1_1_value_task_extensions.html +++ b/class_tgstation_1_1_server_1_1_common_1_1_extensions_1_1_value_task_extensions.html @@ -165,7 +165,7 @@ Static Public Member Functions
118 }
-

Referenced by Tgstation.Server.Host.Components.Deployment.DmbFactory.CleanRegisteredCompileJob(), Tgstation.Server.Host.Components.Deployment.DmbFactory.CleanUnusedCompileJobs(), Tgstation.Server.Host.Components.Deployment.DreamMaker.CleanupFailedCompile(), Tgstation.Server.Host.Swarm.SwarmService.CommitUpdate(), Tgstation.Server.Host.Components.Deployment.DreamMaker.DeploymentProcess(), Tgstation.Server.Client.ApiClient.DisposeAsync(), Tgstation.Server.Host.Security.IdentityCache.DisposeAsync(), Tgstation.Server.Host.Components.StaticFiles.Configuration.EnsureDirectories(), Tgstation.Server.Host.Components.StaticFiles.Configuration.ExecuteEventScripts(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleEventImpl(), Tgstation.Server.Host.Swarm.SwarmService.HealthCheckNodes(), Tgstation.Server.Host.Components.Engine.OpenDreamInstaller.Install(), Tgstation.Server.Host.Components.Engine.WindowsOpenDreamInstaller.Install(), Tgstation.Server.Host.Components.Engine.PosixByondInstaller.Install(), Tgstation.Server.Host.Components.Engine.WindowsByondInstaller.Install(), Tgstation.Server.Host.Components.InstanceManager.OfflineInstance(), Tgstation.Server.Host.Components.Deployment.Remote.BaseRemoteDeploymentManager.PostDeploymentComments(), Tgstation.Server.Host.Swarm.SwarmService.RemoteAbortUpdate(), Tgstation.Server.Host.Components.Chat.ChatManager.RemoveProviderChannels(), Tgstation.Server.Host.Server.RestartImpl(), Tgstation.Server.Client.ApiClient.RunRequest< TResult >(), Tgstation.Server.Host.Components.Chat.ChatManager.SendMessage(), Tgstation.Server.Host.Swarm.SwarmService.SendUpdatedServerListToNodes(), Tgstation.Server.Host.Swarm.SwarmService.Shutdown(), Tgstation.Server.Host.Components.Chat.ChatManager.StartAsync(), Tgstation.Server.Host.Components.Engine.EngineManager.StartAsync(), Tgstation.Server.Host.Components.InstanceManager.StopAsync(), Tgstation.Server.Host.Jobs.JobService.StopAsync(), Tgstation.Server.Host.Components.StaticFiles.Configuration.SymlinkStaticFilesTo(), and Tgstation.Server.Host.Controllers.InstanceController.Update().

+

Referenced by Tgstation.Server.Host.Components.Deployment.DmbFactory.CleanRegisteredCompileJob(), Tgstation.Server.Host.Components.Deployment.DmbFactory.CleanUnusedCompileJobs(), Tgstation.Server.Host.Components.Deployment.DreamMaker.CleanupFailedCompile(), Tgstation.Server.Host.Swarm.SwarmService.CommitUpdate(), Tgstation.Server.Host.Components.Deployment.DreamMaker.DeploymentProcess(), Tgstation.Server.Client.ApiClient.DisposeAsync(), Tgstation.Server.Host.Security.IdentityCache.DisposeAsync(), Tgstation.Server.Host.Components.StaticFiles.Configuration.EnsureDirectories(), Tgstation.Server.Host.Components.StaticFiles.Configuration.ExecuteEventScripts(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleEventImpl(), Tgstation.Server.Host.Swarm.SwarmService.HealthCheckNodes(), Tgstation.Server.Host.Components.Engine.OpenDreamInstaller.Install(), Tgstation.Server.Host.Components.Engine.WindowsOpenDreamInstaller.Install(), Tgstation.Server.Host.Components.Engine.PosixByondInstaller.Install(), Tgstation.Server.Host.Components.Engine.WindowsByondInstaller.Install(), Tgstation.Server.Host.Components.InstanceManager.OfflineInstance(), Tgstation.Server.Host.Components.Deployment.Remote.BaseRemoteDeploymentManager.PostDeploymentComments(), Tgstation.Server.Host.Swarm.SwarmService.RemoteAbortUpdate(), Tgstation.Server.Host.Components.Chat.ChatManager.RemoveProviderChannels(), Tgstation.Server.Host.Server.RestartImpl(), Tgstation.Server.Client.ApiClient.RunRequest< TResult >(), Tgstation.Server.Host.Components.Chat.ChatManager.SendMessage(), Tgstation.Server.Host.Swarm.SwarmService.SendUpdatedServerListToNodes(), Tgstation.Server.Host.Swarm.SwarmService.Shutdown(), Tgstation.Server.Host.Components.Chat.ChatManager.StartAsync(), Tgstation.Server.Host.Components.Engine.EngineManager.StartAsync(), Tgstation.Server.Host.Components.InstanceManager.StopAsync(), Tgstation.Server.Host.Jobs.JobService.StopAsync(), Tgstation.Server.Host.Components.StaticFiles.Configuration.SymlinkStaticFilesTo(), and Tgstation.Server.Host.Controllers.InstanceController.Update().

Here is the caller graph for this function:
diff --git a/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_deployment_1_1_dmb_factory.html b/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_deployment_1_1_dmb_factory.html index 1bb5d1c723..a8fa3d34c9 100644 --- a/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_deployment_1_1_dmb_factory.html +++ b/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_deployment_1_1_dmb_factory.html @@ -1181,7 +1181,7 @@ Here is the caller graph for this function:

References Tgstation.Server.Host.Components.Deployment.DmbFactory.DmbAvailable, and Tgstation.Server.Host.Components.Deployment.DmbFactory.LockNextDmb().

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.InitialCheckDmbUpdated().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.InitialCheckDmbUpdated().

Here is the call graph for this function:
@@ -2115,7 +2115,7 @@ Here is the call graph for this function:

Definition at line 42 of file DmbFactory.cs.

-

Referenced by Tgstation.Server.Host.Components.Deployment.DmbFactory.LatestCompileJob(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), and Tgstation.Server.Host.Components.Deployment.DmbFactory.LockNextDmb().

+

Referenced by Tgstation.Server.Host.Components.Deployment.DmbFactory.LatestCompileJob(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), and Tgstation.Server.Host.Components.Deployment.DmbFactory.LockNextDmb().

@@ -2153,7 +2153,7 @@ Here is the call graph for this function:
37 }
38 }
-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.InitialCheckDmbUpdated().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.InitialCheckDmbUpdated().

diff --git a/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_instance.html b/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_instance.html index a5bc203950..f89f3dd9ff 100644 --- a/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_instance.html +++ b/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_instance.html @@ -2073,7 +2073,7 @@ Here is the caller graph for this function:

Definition at line 36 of file Instance.cs.

-

Referenced by Tgstation.Server.Host.Components.Instance.AutoUpdateAction(), Tgstation.Server.Host.Components.Instance.RepositoryAutoUpdateJob(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.StartAsync().

+

Referenced by Tgstation.Server.Host.Components.Instance.AutoUpdateAction(), Tgstation.Server.Host.Components.Instance.RepositoryAutoUpdateJob(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.StartAsync().

diff --git a/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_interop_1_1_message_content.html b/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_interop_1_1_message_content.html index afd4abede7..e9696e933e 100644 --- a/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_interop_1_1_message_content.html +++ b/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_interop_1_1_message_content.html @@ -162,7 +162,7 @@ Properties

Definition at line 11 of file MessageContent.cs.

11{ get; set; }
-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleChatCommand(), Tgstation.Server.Host.Components.Session.SessionController.ProcessBridgeCommand(), Tgstation.Server.Host.Components.Chat.ChatManager.SendMessage(), and Tgstation.Server.Host.Components.Chat.Providers.IrcProvider.SendMessage().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleChatCommand(), Tgstation.Server.Host.Components.Session.SessionController.ProcessBridgeCommand(), Tgstation.Server.Host.Components.Chat.ChatManager.SendMessage(), and Tgstation.Server.Host.Components.Chat.Providers.IrcProvider.SendMessage().

diff --git a/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_interop_1_1_topic_1_1_topic_parameters.html b/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_interop_1_1_topic_1_1_topic_parameters.html index 8c965696cb..e5df6297be 100644 --- a/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_interop_1_1_topic_1_1_topic_parameters.html +++ b/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_interop_1_1_topic_1_1_topic_parameters.html @@ -673,7 +673,7 @@ Private Member Functions
Returns
The created TopicParameters.
-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Broadcast().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Broadcast().

Here is the caller graph for this function:
diff --git a/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html b/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html index 1d3e9f65a1..58302b0739 100644 --- a/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html +++ b/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_session_persistor.html @@ -304,7 +304,7 @@ Private Attributes

References Tgstation.Server.Host.Components.Session.SessionPersistor.ClearImpl(), and Tgstation.Server.Host.Components.Session.SessionPersistor.logger.

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAndNullControllers().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAndNullControllers().

Here is the call graph for this function:
@@ -633,7 +633,7 @@ Here is the caller graph for this function:

References Tgstation.Server.Host.Components.Session.SessionPersistor.databaseContextFactory, Tgstation.Server.Host.Components.Session.SessionPersistor.dmbFactory, Tgstation.Server.Host.Components.Deployment.IDmbFactory.FromCompileJob(), Tgstation.Server.Host.System.IProcessExecutor.GetProcess(), Tgstation.Server.Host.Components.Session.SessionPersistor.logger, Tgstation.Server.Host.Components.Session.SessionPersistor.metadata, Tgstation.Server.Host.Components.Session.SessionPersistor.processExecutor, Tgstation.Server.Host.System.IProcess.Terminate(), and Tgstation.Server.Host.Database.IDatabaseContextFactory.UseContext().

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.StartAsync().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.StartAsync().

Here is the call graph for this function:
diff --git a/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_watchdog_1_1_advanced_watchdog.html b/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_watchdog_1_1_advanced_watchdog.html index 7c15f4f74d..d368f34ba5 100644 --- a/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_watchdog_1_1_advanced_watchdog.html +++ b/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_watchdog_1_1_advanced_watchdog.html @@ -700,14 +700,14 @@ Private Attributes
121 }
readonly List< Task > deploymentCleanupTasks
List<T> of Tasks that are waiting to clean up old deployments.
IFilesystemLinkFactory LinkFactory
The IFilesystemLinkFactory for the AdvancedWatchdog.
-
readonly IJobManager jobManager
The IJobManager for the WatchdogBase.
-
readonly bool autoStart
If the WatchdogBase should LaunchNoLock(bool, bool, bool, ReattachInformation, CancellationToken) in ...
-
readonly IEventConsumer eventConsumer
The IEventConsumer that is not the WatchdogBase.
- -
readonly IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory
The IRemoteDeploymentManagerFactory for the WatchdogBase.
-
readonly IIOManager diagnosticsIOManager
The IIOManager pointing to the Diagnostics directory.
+
readonly IJobManager jobManager
The IJobManager for the WatchdogBase.
+
readonly bool autoStart
If the WatchdogBase should LaunchNoLock(bool, bool, bool, ReattachInformation, CancellationToken) in ...
+
readonly IEventConsumer eventConsumer
The IEventConsumer that is not the WatchdogBase.
+ +
readonly IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory
The IRemoteDeploymentManagerFactory for the WatchdogBase.
+
readonly IIOManager diagnosticsIOManager
The IIOManager pointing to the Diagnostics directory.
-

References Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.deploymentCleanupTasks, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAsync(), and Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.LinkFactory.

+

References Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.deploymentCleanupTasks, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAsync(), and Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.LinkFactory.

Here is the call graph for this function:
@@ -815,11 +815,11 @@ Here is the caller graph for this function:
360 return true;
361 }
-
ILogger< WatchdogBase > Logger
The ILogger for the WatchdogBase.
+
ILogger< WatchdogBase > Logger
The ILogger for the WatchdogBase.
EngineVersion EngineVersion
The Api.Models.EngineVersion used to build the .dmb.
EngineType
The type of engine the codebase is using.
Definition EngineType.cs:7
-

References Tgstation.Server.Api.Models.EngineVersion.Engine, Tgstation.Server.Host.Components.Deployment.IDmbProvider.EngineVersion, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger.

+

References Tgstation.Server.Api.Models.EngineVersion.Engine, Tgstation.Server.Host.Components.Deployment.IDmbProvider.EngineVersion, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger.

Referenced by Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.HandleNewDmbAvailable(), and Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.PrepServerForLaunch().

@@ -1006,7 +1006,7 @@ Here is the call graph for this function:
440 }
volatile? TaskCompletionSource deploymentCleanupGate
The TaskCompletionSource representing the cleanup of an unused IDmbProvider.
-

References Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.deploymentCleanupGate, Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.deploymentCleanupTasks, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger.

+

References Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.deploymentCleanupGate, Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.deploymentCleanupTasks, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger.

Referenced by Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.DisposeAndNullControllersImpl(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.HandleMonitorWakeup(), and Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.HandleNormalReboot().

@@ -1184,11 +1184,11 @@ Here is the call graph for this function:
bool CanUseSwappableDmbProvider(IDmbProvider dmbProvider)
If the SwappableDmbProvider feature of the AdvancedWatchdog can be used with a given dmbProvider .
SwappableDmbProvider CreateSwappableDmbProvider(IDmbProvider dmbProvider)
Create a SwappableDmbProvider for a given dmbProvider .
async ValueTask PerformDmbSwap(SwappableDmbProvider newProvider, CancellationToken cancellationToken)
Suspends the BasicWatchdog.Server and calls SwappableDmbProvider.MakeActive(CancellationToken) on a n...
-
Models.? CompileJob ActiveCompileJob
Retrieves the Models.CompileJob currently running on the server.
+
Models.? CompileJob ActiveCompileJob
Retrieves the Models.CompileJob currently running on the server.
Provides absolute paths to the latest compiled .dmbs.
Models.CompileJob CompileJob
The CompileJob of the .dmb.
-

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ActiveCompileJob, Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.CanUseSwappableDmbProvider(), Tgstation.Server.Host.Components.Deployment.IDmbProvider.CompileJob, Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.CreateSwappableDmbProvider(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAsync(), Tgstation.Server.Api.Models.Internal.CompileJob.DmeName, Tgstation.Server.Api.Models.EntityId.Id, Tgstation.Server.Host.Components.Deployment.DmbFactory.LockNextDmb(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.pendingSwappable, and Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.PerformDmbSwap().

+

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ActiveCompileJob, Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.CanUseSwappableDmbProvider(), Tgstation.Server.Host.Components.Deployment.IDmbProvider.CompileJob, Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.CreateSwappableDmbProvider(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAsync(), Tgstation.Server.Api.Models.Internal.CompileJob.DmeName, Tgstation.Server.Api.Models.EntityId.Id, Tgstation.Server.Host.Components.Deployment.DmbFactory.LockNextDmb(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.pendingSwappable, and Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.PerformDmbSwap().

Here is the call graph for this function:
@@ -1357,15 +1357,15 @@ Here is the call graph for this function:
ValueTask Update(ReattachInformation reattachInformation, CancellationToken cancellationToken)
Update some reattachInformation .A ValueTask representing the running operation.
ISessionController? Server
The single ISessionController.
-
DreamDaemonLaunchParameters ActiveLaunchParameters
The DreamDaemonLaunchParameters to be applied.
-
async ValueTask BeforeApplyDmb(Models.CompileJob newCompileJob, CancellationToken cancellationToken)
To be called before a given newCompileJob goes live.
-
IChatManager Chat
The IChatManager for the WatchdogBase.
+
DreamDaemonLaunchParameters ActiveLaunchParameters
The DreamDaemonLaunchParameters to be applied.
+
async ValueTask BeforeApplyDmb(Models.CompileJob newCompileJob, CancellationToken cancellationToken)
To be called before a given newCompileJob goes live.
+
IChatManager Chat
The IChatManager for the WatchdogBase.
async ValueTask Delay(TimeSpan timeSpan, CancellationToken cancellationToken)
Create a Task that completes after a given timeSpan .A ValueTask representing the running operation.
void QueueWatchdogMessage(string message)
Queue a chat message to configured watchdog channels.
MonitorAction
The action for the monitor loop to take when control is returned to it.
-

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ActiveLaunchParameters, Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.ActiveSwappable, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.BeforeApplyDmb(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat, Tgstation.Server.Host.Components.Deployment.SwappableDmbProvider.CompileJob, Tgstation.Server.Host.Utils.AsyncDelayer.Delay(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.deploymentCleanupGate, Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.deploymentCleanupTasks, Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.DrainDeploymentCleanupTasks(), Tgstation.Server.Host.Components.Deployment.SwappableDmbProvider.FinishActivationPreparation(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.pendingSwappable, Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.PerformDmbSwap(), Tgstation.Server.Host.Components.Chat.IChatManager.QueueWatchdogMessage(), Tgstation.Server.Host.Server.Restart(), Tgstation.Server.Api.Models.Internal.DreamDaemonLaunchParameters.StartupTimeout, Tgstation.Server.Host.Components.Deployment.SwappableDmbProvider.Swapped, and Tgstation.Server.Host.Components.Session.SessionPersistor.Update().

+

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ActiveLaunchParameters, Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.ActiveSwappable, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.BeforeApplyDmb(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat, Tgstation.Server.Host.Components.Deployment.SwappableDmbProvider.CompileJob, Tgstation.Server.Host.Utils.AsyncDelayer.Delay(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.deploymentCleanupGate, Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.deploymentCleanupTasks, Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.DrainDeploymentCleanupTasks(), Tgstation.Server.Host.Components.Deployment.SwappableDmbProvider.FinishActivationPreparation(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.pendingSwappable, Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.PerformDmbSwap(), Tgstation.Server.Host.Components.Chat.IChatManager.QueueWatchdogMessage(), Tgstation.Server.Host.Server.Restart(), Tgstation.Server.Api.Models.Internal.DreamDaemonLaunchParameters.StartupTimeout, Tgstation.Server.Host.Components.Deployment.SwappableDmbProvider.Swapped, and Tgstation.Server.Host.Components.Session.SessionPersistor.Update().

Here is the call graph for this function:
@@ -1443,7 +1443,7 @@ Here is the call graph for this function:
373 }
ValueTask MakeActive(CancellationToken cancellationToken)
Make the SwappableDmbProvider active by replacing the live link with our CompileJob.
-

References Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.ActiveSwappable, Tgstation.Server.Host.Components.Deployment.SwappableDmbProvider.FinishActivationPreparation(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, and Tgstation.Server.Host.Components.Deployment.SwappableDmbProvider.MakeActive().

+

References Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.ActiveSwappable, Tgstation.Server.Host.Components.Deployment.SwappableDmbProvider.FinishActivationPreparation(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, and Tgstation.Server.Host.Components.Deployment.SwappableDmbProvider.MakeActive().

Referenced by Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.PrepServerForLaunch().

@@ -1549,7 +1549,7 @@ Here is the caller graph for this function:
410 }
void SuspendProcess()
Suspends the process.
-

References Tgstation.Server.Host.Components.Deployment.SwappableDmbProvider.CompileJob, Tgstation.Server.Host.Components.Deployment.SwappableDmbProvider.FinishActivationPreparation(), Tgstation.Server.Api.Models.EntityId.Id, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, and Tgstation.Server.Host.Components.Deployment.SwappableDmbProvider.MakeActive().

+

References Tgstation.Server.Host.Components.Deployment.SwappableDmbProvider.CompileJob, Tgstation.Server.Host.Components.Deployment.SwappableDmbProvider.FinishActivationPreparation(), Tgstation.Server.Api.Models.EntityId.Id, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, and Tgstation.Server.Host.Components.Deployment.SwappableDmbProvider.MakeActive().

Referenced by Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.HandleNewDmbAvailable(), and Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.HandleNormalReboot().

@@ -1655,7 +1655,7 @@ Here is the caller graph for this function:
314 }
async ValueTask InitialLink(CancellationToken cancellationToken)
Create the initial link to the live game directory using ActiveSwappable.
-

References Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.ActiveSwappable, Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.CanUseSwappableDmbProvider(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.CreateSwappableDmbProvider(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.InitialLink(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, and Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.pendingSwappable.

+

References Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.ActiveSwappable, Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.CanUseSwappableDmbProvider(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.CreateSwappableDmbProvider(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.InitialLink(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, and Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.pendingSwappable.

Here is the call graph for this function:
diff --git a/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_watchdog_1_1_basic_watchdog.html b/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_watchdog_1_1_basic_watchdog.html index 7d3a395b51..164fe6218f 100644 --- a/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_watchdog_1_1_basic_watchdog.html +++ b/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_watchdog_1_1_basic_watchdog.html @@ -589,11 +589,11 @@ Private Attributes
93 {
94 }
-
readonly IJobManager jobManager
The IJobManager for the WatchdogBase.
-
readonly bool autoStart
If the WatchdogBase should LaunchNoLock(bool, bool, bool, ReattachInformation, CancellationToken) in ...
-
readonly IEventConsumer eventConsumer
The IEventConsumer that is not the WatchdogBase.
-
readonly IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory
The IRemoteDeploymentManagerFactory for the WatchdogBase.
-
readonly IIOManager diagnosticsIOManager
The IIOManager pointing to the Diagnostics directory.
+
readonly IJobManager jobManager
The IJobManager for the WatchdogBase.
+
readonly bool autoStart
If the WatchdogBase should LaunchNoLock(bool, bool, bool, ReattachInformation, CancellationToken) in ...
+
readonly IEventConsumer eventConsumer
The IEventConsumer that is not the WatchdogBase.
+
readonly IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory
The IRemoteDeploymentManagerFactory for the WatchdogBase.
+
readonly IIOManager diagnosticsIOManager
The IIOManager pointing to the Diagnostics directory.
@@ -788,17 +788,17 @@ Private Attributes
192 }
virtual async ValueTask HandleNewDmbAvailable(CancellationToken cancellationToken)
Handler for MonitorActivationReason.NewDmbAvailable.
virtual ValueTask< MonitorAction > HandleNormalReboot(CancellationToken cancellationToken)
Handler for MonitorActivationReason.ActiveServerRebooted when the RebootState is RebootState....
-
ILogger< WatchdogBase > Logger
The ILogger for the WatchdogBase.
-
WatchdogStatus Status
The current WatchdogStatus.
-
IChatManager Chat
The IChatManager for the WatchdogBase.
-
async ValueTask HandleEventImpl(EventType eventType, IEnumerable< string > parameters, bool relayToSession, CancellationToken cancellationToken)
Handle a given eventType without re-throwing errors.
+
ILogger< WatchdogBase > Logger
The ILogger for the WatchdogBase.
+
WatchdogStatus Status
The current WatchdogStatus.
+
IChatManager Chat
The IChatManager for the WatchdogBase.
+
async ValueTask HandleEventImpl(EventType eventType, IEnumerable< string > parameters, bool relayToSession, CancellationToken cancellationToken)
Handle a given eventType without re-throwing errors.
void QueueWatchdogMessage(string message)
Queue a chat message to configured watchdog channels.
@ Api
The ApiHeaders.ApiVersionHeader header is missing or invalid.
EventType
Types of events. Mirror in tgs.dm. Prefer last listed name for script.
Definition EventType.cs:7
MonitorAction
The action for the monitor loop to take when control is returned to it.
MonitorActivationReason
Reasons for the monitor to wake up.
-

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat, Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.gracefulRebootRequired, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleEventImpl(), Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.HandleNewDmbAvailable(), Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.HandleNormalReboot(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, Tgstation.Server.Host.Components.Chat.IChatManager.QueueWatchdogMessage(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Status.

+

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat, Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.gracefulRebootRequired, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleEventImpl(), Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.HandleNewDmbAvailable(), Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.HandleNormalReboot(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, Tgstation.Server.Host.Components.Chat.IChatManager.QueueWatchdogMessage(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Status.

Here is the call graph for this function:
@@ -874,7 +874,7 @@ Here is the call graph for this function:
virtual ? Version DMApiVersion
The DMAPI Version.
Definition CompileJob.cs:41
ValueTask< bool > SetRebootState(RebootState newRebootState, CancellationToken cancellationToken)
Attempts to change the current RebootState to newRebootState .
-

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat, Tgstation.Server.Api.Models.Internal.CompileJob.DMApiVersion, Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.gracefulRebootRequired, and Tgstation.Server.Host.Components.Chat.IChatManager.QueueWatchdogMessage().

+

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat, Tgstation.Server.Api.Models.Internal.CompileJob.DMApiVersion, Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.gracefulRebootRequired, and Tgstation.Server.Host.Components.Chat.IChatManager.QueueWatchdogMessage().

Referenced by Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.HandleMonitorWakeup().

@@ -943,7 +943,7 @@ Here is the caller graph for this function:
304 return ValueTask.FromResult(MonitorAction.Continue);
305 }
-

References Tgstation.Server.Api.Models.Internal.CompileJob.DMApiVersion, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Status.

+

References Tgstation.Server.Api.Models.Internal.CompileJob.DMApiVersion, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Status.

Referenced by Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.HandleMonitorWakeup().

@@ -1084,15 +1084,15 @@ Here is the caller graph for this function:
ValueTask Update(ReattachInformation reattachInformation, CancellationToken cancellationToken)
Update some reattachInformation .A ValueTask representing the running operation.
virtual ValueTask SessionStartupPersist(CancellationToken cancellationToken)
Called to save the current Server into the WatchdogBase.SessionPersistor when initially launched.
virtual ValueTask< IDmbProvider > PrepServerForLaunch(IDmbProvider dmbToUse, CancellationToken cancellationToken)
Prepare the server to launch a new instance with the WatchdogBase.ActiveLaunchParameters and a given ...
-
async ValueTask ReattachFailure(CancellationToken cancellationToken)
Call from InitController(ValueTask, ReattachInformation, CancellationToken) when a reattach operation...
-
async ValueTask CheckLaunchResult(ISessionController controller, string serverName, CancellationToken cancellationToken)
Check the LaunchResult of a given controller for errors and throw a JobException if any are detected...
-
DreamDaemonLaunchParameters ActiveLaunchParameters
The DreamDaemonLaunchParameters to be applied.
-
async ValueTask BeforeApplyDmb(Models.CompileJob newCompileJob, CancellationToken cancellationToken)
To be called before a given newCompileJob goes live.
-
async ValueTask DisposeAndNullControllers(CancellationToken cancellationToken)
Wrapper for DisposeAndNullControllersImpl under a locked context.
-
long? SessionId
An incrementing ID for representing current server execution.
+
async ValueTask ReattachFailure(CancellationToken cancellationToken)
Call from InitController(ValueTask, ReattachInformation, CancellationToken) when a reattach operation...
+
async ValueTask CheckLaunchResult(ISessionController controller, string serverName, CancellationToken cancellationToken)
Check the LaunchResult of a given controller for errors and throw a JobException if any are detected...
+
DreamDaemonLaunchParameters ActiveLaunchParameters
The DreamDaemonLaunchParameters to be applied.
+
async ValueTask BeforeApplyDmb(Models.CompileJob newCompileJob, CancellationToken cancellationToken)
To be called before a given newCompileJob goes live.
+
async ValueTask DisposeAndNullControllers(CancellationToken cancellationToken)
Wrapper for DisposeAndNullControllersImpl under a locked context.
+
long? SessionId
An incrementing ID for representing current server execution.
ReattachInformation ReattachInformation
Gets the Session.ReattachInformation associated with the ISessionController.
-

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ActiveLaunchParameters, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.BeforeApplyDmb(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.CheckLaunchResult(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAndNullControllers(), Tgstation.Server.Api.Models.EntityId.Id, Tgstation.Server.Host.Components.Session.SessionControllerFactory.LaunchNew(), Tgstation.Server.Host.Components.Deployment.DmbFactory.LockNextDmb(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.PrepServerForLaunch(), Tgstation.Server.Host.Components.Session.SessionControllerFactory.Reattach(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ReattachFailure(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.SessionId, Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.SessionStartupPersist(), and Tgstation.Server.Host.Components.Session.SessionPersistor.Update().

+

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ActiveLaunchParameters, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.BeforeApplyDmb(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.CheckLaunchResult(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAndNullControllers(), Tgstation.Server.Api.Models.EntityId.Id, Tgstation.Server.Host.Components.Session.SessionControllerFactory.LaunchNew(), Tgstation.Server.Host.Components.Deployment.DmbFactory.LockNextDmb(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.PrepServerForLaunch(), Tgstation.Server.Host.Components.Session.SessionControllerFactory.Reattach(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ReattachFailure(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.SessionId, Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.SessionStartupPersist(), and Tgstation.Server.Host.Components.Session.SessionPersistor.Update().

Here is the call graph for this function:
diff --git a/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_watchdog_1_1_posix_watchdog.html b/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_watchdog_1_1_posix_watchdog.html index e685219e84..f017895d6b 100644 --- a/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_watchdog_1_1_posix_watchdog.html +++ b/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_watchdog_1_1_posix_watchdog.html @@ -691,11 +691,11 @@ Additional Inherited Members
89 this.generalConfiguration = generalConfiguration ?? throw new ArgumentNullException(nameof(generalConfiguration));
90 }
readonly GeneralConfiguration generalConfiguration
The GeneralConfiguration for the PosixWatchdog.
-
readonly IJobManager jobManager
The IJobManager for the WatchdogBase.
-
readonly bool autoStart
If the WatchdogBase should LaunchNoLock(bool, bool, bool, ReattachInformation, CancellationToken) in ...
-
readonly IEventConsumer eventConsumer
The IEventConsumer that is not the WatchdogBase.
-
readonly IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory
The IRemoteDeploymentManagerFactory for the WatchdogBase.
-
readonly IIOManager diagnosticsIOManager
The IIOManager pointing to the Diagnostics directory.
+
readonly IJobManager jobManager
The IJobManager for the WatchdogBase.
+
readonly bool autoStart
If the WatchdogBase should LaunchNoLock(bool, bool, bool, ReattachInformation, CancellationToken) in ...
+
readonly IEventConsumer eventConsumer
The IEventConsumer that is not the WatchdogBase.
+
readonly IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory
The IRemoteDeploymentManagerFactory for the WatchdogBase.
+
readonly IIOManager diagnosticsIOManager
The IIOManager pointing to the Diagnostics directory.

References Tgstation.Server.Host.Components.Watchdog.PosixWatchdog.generalConfiguration.

diff --git a/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_watchdog_1_1_watchdog_base.html b/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_watchdog_1_1_watchdog_base.html index 5dac92cd16..b04717a963 100644 --- a/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_watchdog_1_1_watchdog_base.html +++ b/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_watchdog_1_1_watchdog_base.html @@ -488,7 +488,7 @@ Private Attributes

Detailed Description

Base class for IWatchdogs.

-

Definition at line 36 of file WatchdogBase.cs.

+

Definition at line 35 of file WatchdogBase.cs.

Constructor & Destructor Documentation

◆ WatchdogBase()

@@ -624,70 +624,70 @@ Private Attributes -

Definition at line 210 of file WatchdogBase.cs.

-
226 {
-
227 Chat = chat ?? throw new ArgumentNullException(nameof(chat));
-
228 SessionControllerFactory = sessionControllerFactory ?? throw new ArgumentNullException(nameof(sessionControllerFactory));
-
229 DmbFactory = dmbFactory ?? throw new ArgumentNullException(nameof(dmbFactory));
- - -
232 AsyncDelayer = asyncDelayer ?? throw new ArgumentNullException(nameof(asyncDelayer));
- - - -
236 GameIOManager = gameIOManager ?? throw new ArgumentNullException(nameof(gameIOManager));
-
237 Logger = logger ?? throw new ArgumentNullException(nameof(logger));
- - - -
241
-
242 ArgumentNullException.ThrowIfNull(serverControl);
-
243
-
244 chat.RegisterCommandHandler(this);
-
245
- -
247 releaseServers = false;
-
248 activeParametersUpdated = new TaskCompletionSource();
-
249
-
250 restartRegistration = serverControl.RegisterForRestart(this);
-
251 try
-
252 {
- - -
255 }
-
256 catch
-
257 {
-
258 restartRegistration.Dispose();
-
259 synchronizationSemaphore?.Dispose();
-
260 throw;
-
261 }
-
262
-
263 Logger.LogTrace("Created watchdog");
-
264 }
+

Definition at line 209 of file WatchdogBase.cs.

+
225 {
+
226 Chat = chat ?? throw new ArgumentNullException(nameof(chat));
+
227 SessionControllerFactory = sessionControllerFactory ?? throw new ArgumentNullException(nameof(sessionControllerFactory));
+
228 DmbFactory = dmbFactory ?? throw new ArgumentNullException(nameof(dmbFactory));
+ + +
231 AsyncDelayer = asyncDelayer ?? throw new ArgumentNullException(nameof(asyncDelayer));
+ + + +
235 GameIOManager = gameIOManager ?? throw new ArgumentNullException(nameof(gameIOManager));
+
236 Logger = logger ?? throw new ArgumentNullException(nameof(logger));
+ + + +
240
+
241 ArgumentNullException.ThrowIfNull(serverControl);
+
242
+
243 chat.RegisterCommandHandler(this);
+
244
+ +
246 releaseServers = false;
+
247 activeParametersUpdated = new TaskCompletionSource();
+
248
+
249 restartRegistration = serverControl.RegisterForRestart(this);
+
250 try
+
251 {
+ + +
254 }
+
255 catch
+
256 {
+
257 restartRegistration.Dispose();
+
258 synchronizationSemaphore?.Dispose();
+
259 throw;
+
260 }
+
261
+
262 Logger.LogTrace("Created watchdog");
+
263 }
-
readonly IJobManager jobManager
The IJobManager for the WatchdogBase.
-
ILogger< WatchdogBase > Logger
The ILogger for the WatchdogBase.
-
bool releaseServers
If the servers should be released instead of shutdown.
-
readonly bool autoStart
If the WatchdogBase should LaunchNoLock(bool, bool, bool, ReattachInformation, CancellationToken) in ...
-
readonly Api.Models.Instance metadata
The Api.Models.Instance for the WatchdogBase.
-
readonly IEventConsumer eventConsumer
The IEventConsumer that is not the WatchdogBase.
-
readonly SemaphoreSlim controllerDisposeSemaphore
SemaphoreSlim used for DisposeAndNullControllers.
-
readonly IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory
The IRemoteDeploymentManagerFactory for the WatchdogBase.
-
readonly SemaphoreSlim synchronizationSemaphore
The SemaphoreSlim for the WatchdogBase.
-
readonly IIOManager diagnosticsIOManager
The IIOManager pointing to the Diagnostics directory.
-
IIOManager GameIOManager
The IIOManager for the WatchdogBase pointing to the Game directory.
-
DreamDaemonLaunchParameters ActiveLaunchParameters
The DreamDaemonLaunchParameters to be applied.
-
IChatManager Chat
The IChatManager for the WatchdogBase.
-
readonly IRestartRegistration restartRegistration
The IRestartRegistration for the WatchdogBase.
-
volatile TaskCompletionSource activeParametersUpdated
TaskCompletionSource that completes when ActiveLaunchParameters are changed and we are running.
+
readonly IJobManager jobManager
The IJobManager for the WatchdogBase.
+
ILogger< WatchdogBase > Logger
The ILogger for the WatchdogBase.
+
bool releaseServers
If the servers should be released instead of shutdown.
+
readonly bool autoStart
If the WatchdogBase should LaunchNoLock(bool, bool, bool, ReattachInformation, CancellationToken) in ...
+
readonly Api.Models.Instance metadata
The Api.Models.Instance for the WatchdogBase.
+
readonly IEventConsumer eventConsumer
The IEventConsumer that is not the WatchdogBase.
+
readonly SemaphoreSlim controllerDisposeSemaphore
SemaphoreSlim used for DisposeAndNullControllers.
+
readonly IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory
The IRemoteDeploymentManagerFactory for the WatchdogBase.
+
readonly SemaphoreSlim synchronizationSemaphore
The SemaphoreSlim for the WatchdogBase.
+
readonly IIOManager diagnosticsIOManager
The IIOManager pointing to the Diagnostics directory.
+
IIOManager GameIOManager
The IIOManager for the WatchdogBase pointing to the Game directory.
+
DreamDaemonLaunchParameters ActiveLaunchParameters
The DreamDaemonLaunchParameters to be applied.
+
IChatManager Chat
The IChatManager for the WatchdogBase.
+
readonly IRestartRegistration restartRegistration
The IRestartRegistration for the WatchdogBase.
+
volatile TaskCompletionSource activeParametersUpdated
TaskCompletionSource that completes when ActiveLaunchParameters are changed and we are running.
void RegisterCommandHandler(ICustomCommandHandler customCommandHandler)
Registers a customCommandHandler to use.
IRestartRegistration RegisterForRestart(IRestartHandler handler)
Register a given handler to run before stopping the server for a restart.
@ List
User may list files if the Models.Instance allows it.
-

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ActiveLaunchParameters, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.activeParametersUpdated, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.autoStart, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.controllerDisposeSemaphore, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.diagnosticsIOManager, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.eventConsumer, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.GameIOManager, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.jobManager, Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.metadata, Tgstation.Server.Host.Components.Chat.IChatManager.RegisterCommandHandler(), Tgstation.Server.Host.Core.IServerControl.RegisterForRestart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.releaseServers, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.remoteDeploymentManagerFactory, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.restartRegistration, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.synchronizationSemaphore.

+

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ActiveLaunchParameters, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.activeParametersUpdated, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.autoStart, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.controllerDisposeSemaphore, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.diagnosticsIOManager, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.eventConsumer, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.GameIOManager, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.jobManager, Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.metadata, Tgstation.Server.Host.Components.Chat.IChatManager.RegisterCommandHandler(), Tgstation.Server.Host.Core.IServerControl.RegisterForRestart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.releaseServers, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.remoteDeploymentManagerFactory, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.restartRegistration, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.synchronizationSemaphore.

Here is the call graph for this function:
@@ -748,46 +748,46 @@ Here is the call graph for this function:
Returns
A ValueTask representing the running operation.
-

Definition at line 726 of file WatchdogBase.cs.

-
727 {
- -
729 {
-
730 Logger.LogTrace("Same compile job, not sending deployment event");
-
731 return;
-
732 }
-
733
- -
735 metadata,
- -
737
- -
739 EventType.DeploymentActivation,
-
740 new List<string?>
-
741 {
-
742 GameIOManager.ResolvePath(newCompileJob.DirectoryName!.Value.ToString()),
-
743 },
-
744 false,
- -
746
-
747 try
-
748 {
- -
750 }
-
751 catch (Exception ex)
-
752 {
-
753 Logger.LogWarning(ex, "Failed to apply remote deployment!");
-
754 }
-
755
- -
757 }
+

Definition at line 725 of file WatchdogBase.cs.

+
726 {
+ +
728 {
+
729 Logger.LogTrace("Same compile job, not sending deployment event");
+
730 return;
+
731 }
+
732
+ +
734 metadata,
+ +
736
+ +
738 EventType.DeploymentActivation,
+
739 new List<string?>
+
740 {
+
741 GameIOManager.ResolvePath(newCompileJob.DirectoryName!.Value.ToString()),
+
742 },
+
743 false,
+ +
745
+
746 try
+
747 {
+ +
749 }
+
750 catch (Exception ex)
+
751 {
+
752 Logger.LogWarning(ex, "Failed to apply remote deployment!");
+
753 }
+
754
+ +
756 }
virtual ? long Id
The ID of the entity.
Definition EntityId.cs:13
-
Models.? CompileJob ActiveCompileJob
Retrieves the Models.CompileJob currently running on the server.
+
Models.? CompileJob ActiveCompileJob
Retrieves the Models.CompileJob currently running on the server.
IRemoteDeploymentManager CreateRemoteDeploymentManager(Api.Models.Instance metadata, RemoteGitProvider remoteGitProvider)
Creates a IRemoteDeploymentManager for a given remoteGitProvider .
ValueTask HandleEvent(EventType eventType, IEnumerable< string?> parameters, bool deploymentPipeline, CancellationToken cancellationToken)
Handle a given eventType .
EventType
Types of events. Mirror in tgs.dm. Prefer last listed name for script.
Definition EventType.cs:7
-

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ActiveCompileJob, Tgstation.Server.Host.Components.Deployment.Remote.IRemoteDeploymentManagerFactory.CreateRemoteDeploymentManager(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.eventConsumer, Tgstation.Server.Host.Components.Events.IEventConsumer.HandleEvent(), Tgstation.Server.Api.Models.EntityId.Id, Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.metadata, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.remoteDeploymentManagerFactory.

+

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ActiveCompileJob, Tgstation.Server.Host.Components.Deployment.Remote.IRemoteDeploymentManagerFactory.CreateRemoteDeploymentManager(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.eventConsumer, Tgstation.Server.Host.Components.Events.IEventConsumer.HandleEvent(), Tgstation.Server.Api.Models.EntityId.Id, Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.metadata, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.remoteDeploymentManagerFactory.

Referenced by Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.HandleNormalReboot(), and Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.InitController().

@@ -855,46 +855,46 @@ Here is the caller graph for this function:

Implements Tgstation.Server.Host.Components.Watchdog.IWatchdog.

-

Definition at line 469 of file WatchdogBase.cs.

-
470 {
-
471 ArgumentNullException.ThrowIfNull(message);
-
472
- -
474 if (activeServer == null)
-
475 {
-
476 Logger.LogInformation("Attempted broadcast failed, no active server!");
-
477 return false;
-
478 }
-
479
-
480 if (!activeServer.DMApiAvailable)
-
481 {
-
482 Logger.LogInformation("Attempted broadcast failed, no DMAPI!");
-
483 return false;
-
484 }
-
485
-
486 var minimumRequiredVersion = new Version(5, 7, 0);
-
487 if (activeServer.DMApiVersion < minimumRequiredVersion)
-
488 {
-
489 Logger.LogInformation(
-
490 "Attempted broadcast failed, insufficient interop version: {interopVersion}. Requires {minimumRequiredVersion}!",
-
491 activeServer.DMApiVersion,
- -
493 return false;
-
494 }
-
495
-
496 Logger.LogInformation("Broadcasting: {message}", message);
-
497
-
498 var response = await activeServer.SendCommand(
- - -
501
-
502 return response != null && response.ErrorMessage == null;
-
503 }
+

Definition at line 468 of file WatchdogBase.cs.

+
469 {
+
470 ArgumentNullException.ThrowIfNull(message);
+
471
+ +
473 if (activeServer == null)
+
474 {
+
475 Logger.LogInformation("Attempted broadcast failed, no active server!");
+
476 return false;
+
477 }
+
478
+
479 if (!activeServer.DMApiAvailable)
+
480 {
+
481 Logger.LogInformation("Attempted broadcast failed, no DMAPI!");
+
482 return false;
+
483 }
+
484
+
485 var minimumRequiredVersion = new Version(5, 7, 0);
+
486 if (activeServer.DMApiVersion < minimumRequiredVersion)
+
487 {
+
488 Logger.LogInformation(
+
489 "Attempted broadcast failed, insufficient interop version: {interopVersion}. Requires {minimumRequiredVersion}!",
+
490 activeServer.DMApiVersion,
+ +
492 return false;
+
493 }
+
494
+
495 Logger.LogInformation("Broadcasting: {message}", message);
+
496
+
497 var response = await activeServer.SendCommand(
+ + +
500
+
501 return response != null && response.ErrorMessage == null;
+
502 }
static TopicParameters CreateBroadcastParameters(string broadcastMessage)
Initializes a new instance of the TopicParameters class.
ISessionController? GetActiveController()
Get the active ISessionController.
-

References Tgstation.Server.Host.Components.Interop.Topic.TopicParameters.CreateBroadcastParameters(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.GetActiveController(), Tgstation.Server.Api.Rights.List, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger.

+

References Tgstation.Server.Host.Components.Interop.Topic.TopicParameters.CreateBroadcastParameters(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.GetActiveController(), Tgstation.Server.Api.Rights.List, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger.

Here is the call graph for this function:
@@ -948,34 +948,34 @@ Here is the call graph for this function:

Implements Tgstation.Server.Host.Components.Watchdog.IWatchdog.

-

Definition at line 280 of file WatchdogBase.cs.

-
281 {
- -
283 {
- - - -
287 if (!currentEngine.HasValue)
-
288 return false;
-
289
-
290 bool match = launchParameters.CanApplyWithoutReboot(currentLaunchParameters, currentEngine.Value);
-
291 if (match || Status == WatchdogStatus.Offline || Status == WatchdogStatus.DelayedRestart)
-
292 return false;
-
293
-
294 var oldTcs = Interlocked.Exchange(ref activeParametersUpdated, new TaskCompletionSource());
-
295 oldTcs.SetResult();
-
296 }
-
297
-
298 return true;
-
299 }
+

Definition at line 279 of file WatchdogBase.cs.

+
280 {
+ +
282 {
+ + + +
286 if (!currentEngine.HasValue)
+
287 return false;
+
288
+
289 bool match = launchParameters.CanApplyWithoutReboot(currentLaunchParameters, currentEngine.Value);
+
290 if (match || Status == WatchdogStatus.Offline || Status == WatchdogStatus.DelayedRestart)
+
291 return false;
+
292
+
293 var oldTcs = Interlocked.Exchange(ref activeParametersUpdated, new TaskCompletionSource());
+
294 oldTcs.SetResult();
+
295 }
+
296
+
297 return true;
+
298 }
-
WatchdogStatus Status
The current WatchdogStatus.
+
WatchdogStatus Status
The current WatchdogStatus.
static async ValueTask< SemaphoreSlimContext > Lock(SemaphoreSlim semaphore, CancellationToken cancellationToken, ILogger? logger=null)
Asyncronously locks a semaphore .
EngineVersion EngineVersion
Gets the Api.Models.EngineVersion associated with the ISessionController.
WatchdogStatus
The current status of the watchdog.
-

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ActiveLaunchParameters, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.activeParametersUpdated, Tgstation.Server.Api.Models.EngineVersion.Engine, Tgstation.Server.Host.Components.Session.ISessionController.EngineVersion, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.GetActiveController(), Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Utils.SemaphoreSlimContext.Lock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Status, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.synchronizationSemaphore.

+

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ActiveLaunchParameters, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.activeParametersUpdated, Tgstation.Server.Api.Models.EngineVersion.Engine, Tgstation.Server.Host.Components.Session.ISessionController.EngineVersion, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.GetActiveController(), Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Utils.SemaphoreSlimContext.Lock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Status, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.synchronizationSemaphore.

Here is the call graph for this function:
@@ -1042,20 +1042,20 @@ Here is the call graph for this function:
Returns
A ValueTask representing the running operation.
-

Definition at line 649 of file WatchdogBase.cs.

-
650 {
-
651 var launchResult = await controller.LaunchResult.WaitAsync(cancellationToken);
-
652
-
653 // Dead sessions won't trigger this
-
654 if (launchResult.ExitCode.HasValue) // you killed us ray...
-
655 throw new JobException(
-
656 ErrorCode.WatchdogStartupFailed,
-
657 new JobException($"{serverName} failed to start: {launchResult}"));
-
658 if (!launchResult.StartupTime.HasValue)
-
659 throw new JobException(
-
660 ErrorCode.WatchdogStartupTimeout,
-
661 new JobException($"{serverName} timed out on startup: {ActiveLaunchParameters.StartupTimeout!.Value}s"));
-
662 }
+

Definition at line 648 of file WatchdogBase.cs.

+
649 {
+
650 var launchResult = await controller.LaunchResult.WaitAsync(cancellationToken);
+
651
+
652 // Dead sessions won't trigger this
+
653 if (launchResult.ExitCode.HasValue) // you killed us ray...
+
654 throw new JobException(
+
655 ErrorCode.WatchdogStartupFailed,
+
656 new JobException($"{serverName} failed to start: {launchResult}"));
+
657 if (!launchResult.StartupTime.HasValue)
+
658 throw new JobException(
+
659 ErrorCode.WatchdogStartupTimeout,
+
660 new JobException($"{serverName} timed out on startup: {ActiveLaunchParameters.StartupTimeout!.Value}s"));
+
661 }
Operation exceptions thrown from the context of a Models.Job.
ErrorCode
Types of Response.ErrorMessageResponses that the API may return.
Definition ErrorCode.cs:12
@@ -1102,14 +1102,14 @@ Here is the caller graph for this function:

Implements Tgstation.Server.Host.Components.Watchdog.IWatchdog.

-

Definition at line 462 of file WatchdogBase.cs.

-
463 {
- - -
466 }
-
async ValueTask CreateDumpNoLock(CancellationToken cancellationToken)
Attempt to create a process dump for the game server. Requires a lock on synchronizationSemaphore.
+

Definition at line 461 of file WatchdogBase.cs.

+
462 {
+ + +
465 }
+
async ValueTask CreateDumpNoLock(CancellationToken cancellationToken)
Attempt to create a process dump for the game server. Requires a lock on synchronizationSemaphore.
-

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.CreateDumpNoLock(), Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Utils.SemaphoreSlimContext.Lock(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.synchronizationSemaphore.

+

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.CreateDumpNoLock(), Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Utils.SemaphoreSlimContext.Lock(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.synchronizationSemaphore.

Here is the call graph for this function:
@@ -1158,35 +1158,35 @@ Here is the call graph for this function:
Returns
A ValueTask representing the running operation.
-

Definition at line 1246 of file WatchdogBase.cs.

-
1247 {
-
1248 const string DumpDirectory = "ProcessDumps";
-
1249
- -
1251 if (session?.Lifetime.IsCompleted != false)
-
1252 throw new JobException(ErrorCode.GameServerOffline);
-
1253
-
1254 var dumpFileExtension = session.DumpFileExtension;
-
1255
- - - -
1259 $"DreamDaemon-{DateTimeOffset.UtcNow.ToFileStamp()}"));
-
1260
-
1261 var dumpFileName = $"{dumpFileNameTemplate}{dumpFileExtension}";
-
1262 var iteration = 0;
- -
1264 dumpFileName = $"{dumpFileNameTemplate} ({++iteration}){dumpFileExtension}";
-
1265
-
1266 if (iteration == 0)
- -
1268
-
1269 if (session.Lifetime.IsCompleted)
-
1270 throw new JobException(ErrorCode.GameServerOffline);
-
1271
-
1272 Logger.LogInformation("Dumping session to {dumpFileName}...", dumpFileName);
- -
1274 }
+

Definition at line 1245 of file WatchdogBase.cs.

+
1246 {
+
1247 const string DumpDirectory = "ProcessDumps";
+
1248
+ +
1250 if (session?.Lifetime.IsCompleted != false)
+
1251 throw new JobException(ErrorCode.GameServerOffline);
+
1252
+
1253 var dumpFileExtension = session.DumpFileExtension;
+
1254
+ + + +
1258 $"DreamDaemon-{DateTimeOffset.UtcNow.ToFileStamp()}"));
+
1259
+
1260 var dumpFileName = $"{dumpFileNameTemplate}{dumpFileExtension}";
+
1261 var iteration = 0;
+ +
1263 dumpFileName = $"{dumpFileNameTemplate} ({++iteration}){dumpFileExtension}";
+
1264
+
1265 if (iteration == 0)
+ +
1267
+
1268 if (session.Lifetime.IsCompleted)
+
1269 throw new JobException(ErrorCode.GameServerOffline);
+
1270
+
1271 Logger.LogInformation("Dumping session to {dumpFileName}...", dumpFileName);
+ +
1273 }
bool? Minidumps
If minidumps should be taken instead of full dumps.
string ResolvePath()
Retrieve the full path of the current working directory.
string ConcatPath(params string[] paths)
Combines an array of strings into a path.
@@ -1195,7 +1195,7 @@ Here is the call graph for this function:

References Tgstation.Server.Api.Rights.List.

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.CreateDump(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleHealthCheck().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.CreateDump(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleHealthCheck().

Here is the caller graph for this function:
@@ -1257,22 +1257,22 @@ Here is the caller graph for this function:
Returns
A ValueTask representing the running operation.
-

Definition at line 693 of file WatchdogBase.cs.

-
694 {
-
695 Logger.LogTrace("DisposeAndNullControllers");
- -
697 {
- -
699 if (!releaseServers)
- -
701 }
-
702 }
+

Definition at line 692 of file WatchdogBase.cs.

+
693 {
+
694 Logger.LogTrace("DisposeAndNullControllers");
+ +
696 {
+ +
698 if (!releaseServers)
+ +
700 }
+
701 }
ValueTask Clear(CancellationToken cancellationToken)
Clear any stored ReattachInformation.A ValueTask representing the running operation.
ValueTask DisposeAndNullControllersImpl()
Call IDisposable.Dispose and null the fields for all ISessionControllers.
-

References Tgstation.Server.Host.Components.Session.SessionPersistor.Clear(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.controllerDisposeSemaphore, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAndNullControllersImpl(), Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Utils.SemaphoreSlimContext.Lock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.releaseServers.

+

References Tgstation.Server.Host.Components.Session.SessionPersistor.Clear(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.controllerDisposeSemaphore, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAndNullControllersImpl(), Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Utils.SemaphoreSlimContext.Lock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.releaseServers.

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleHealthCheck(), Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.InitController(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorRestart(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ReattachFailure().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleHealthCheck(), Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.InitController(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorRestart(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ReattachFailure().

Here is the call graph for this function:
@@ -1350,7 +1350,7 @@ Here is the caller graph for this function:

Call IDisposable.Dispose and null the fields for all ISessionControllers.

Returns
A ValueTask representing the running operation.
-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAndNullControllers(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAsync().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAndNullControllers(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAsync().

Here is the caller graph for this function:
@@ -1409,21 +1409,21 @@ Here is the caller graph for this function:

-

Definition at line 267 of file WatchdogBase.cs.

-
268 {
-
269 Logger.LogTrace("Disposing...");
-
270 synchronizationSemaphore.Dispose();
-
271 restartRegistration.Dispose();
-
272
- - -
275 monitorCts?.Dispose();
-
276 disposed = true;
-
277 }
-
bool disposed
If the WatchdogBase has been DisposeAsync'd.
-
CancellationTokenSource? monitorCts
The CancellationTokenSource for the monitor loop.
+

Definition at line 266 of file WatchdogBase.cs.

+
267 {
+
268 Logger.LogTrace("Disposing...");
+
269 synchronizationSemaphore.Dispose();
+
270 restartRegistration.Dispose();
+
271
+ + +
274 monitorCts?.Dispose();
+
275 disposed = true;
+
276 }
+
bool disposed
If the WatchdogBase has been DisposeAsync'd.
+
CancellationTokenSource? monitorCts
The CancellationTokenSource for the monitor loop.
-

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.controllerDisposeSemaphore, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAndNullControllersImpl(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.disposed, Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.monitorCts, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.restartRegistration, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.synchronizationSemaphore.

+

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.controllerDisposeSemaphore, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAndNullControllersImpl(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.disposed, Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.monitorCts, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.restartRegistration, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.synchronizationSemaphore.

Referenced by Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.AdvancedWatchdog(), and Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.HandleNewDmbAvailable().

@@ -1477,7 +1477,7 @@ Here is the caller graph for this function:

Get the active ISessionController.

Returns
The active ISessionController, if any.
-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Broadcast(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ChangeSettings(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleChatCommand(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleEvent(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleHealthCheck(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ResetRebootState(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Restart(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.TerminateNoLock().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Broadcast(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ChangeSettings(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleChatCommand(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleEvent(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleHealthCheck(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ResetRebootState(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Restart(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.TerminateNoLock().

Here is the caller graph for this function:
@@ -1575,55 +1575,55 @@ Here is the caller graph for this function:

Implements Tgstation.Server.Host.Components.Chat.ICustomCommandHandler.

-

Definition at line 302 of file WatchdogBase.cs.

-
303 {
- -
305 {
- - - -
309 if (Status != WatchdogStatus.Online || activeServer == null)
-
310 return new MessageContent
-
311 {
-
312 Text = "TGS: Server offline!",
-
313 };
-
314
- -
316
-
317 if (commandResult == null)
-
318 return new MessageContent
-
319 {
-
320 Text = "TGS: Bad topic exchange!",
-
321 };
-
322
-
323 if (commandResult == null)
-
324 return new MessageContent
-
325 {
-
326 Text = "TGS: Bad topic response!",
-
327 };
-
328
- -
330 {
-
331 Text = commandResult.CommandResponse?.Text ?? commandResult.CommandResponseMessage,
-
332 Embed = commandResult.CommandResponse?.Embed,
-
333 };
-
334
-
335 if (commandResponse.Text == null && commandResponse.Embed == null)
-
336 {
-
337 commandResponse.Text = "TGS: Command processed but no DMAPI response returned!";
-
338 }
-
339
- -
341
-
342 return commandResponse;
-
343 }
-
344 }
+

Definition at line 301 of file WatchdogBase.cs.

+
302 {
+ +
304 {
+ + + +
308 if (Status != WatchdogStatus.Online || activeServer == null)
+
309 return new MessageContent
+
310 {
+
311 Text = "TGS: Server offline!",
+
312 };
+
313
+ +
315
+
316 if (commandResult == null)
+
317 return new MessageContent
+
318 {
+
319 Text = "TGS: Bad topic exchange!",
+
320 };
+
321
+
322 if (commandResult == null)
+
323 return new MessageContent
+
324 {
+
325 Text = "TGS: Bad topic response!",
+
326 };
+
327
+ +
329 {
+
330 Text = commandResult.CommandResponse?.Text ?? commandResult.CommandResponseMessage,
+
331 Embed = commandResult.CommandResponse?.Embed,
+
332 };
+
333
+
334 if (commandResponse.Text == null && commandResponse.Embed == null)
+
335 {
+
336 commandResponse.Text = "TGS: Command processed but no DMAPI response returned!";
+
337 }
+
338
+ +
340
+
341 return commandResponse;
+
342 }
+
343 }
Represents a message to send to a chat provider.
Represents a chat command to be handled by DD.
-
void HandleChatResponses(TopicResponse? result)
Handle any TopicResponse.ChatResponses in a given topic result .
+
void HandleChatResponses(TopicResponse? result)
Handle any TopicResponse.ChatResponses in a given topic result .
-

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.GetActiveController(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleChatResponses(), Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Utils.SemaphoreSlimContext.Lock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Status, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.synchronizationSemaphore, and Tgstation.Server.Host.Components.Interop.MessageContent.Text.

+

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.GetActiveController(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleChatResponses(), Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Utils.SemaphoreSlimContext.Lock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Status, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.synchronizationSemaphore, and Tgstation.Server.Host.Components.Interop.MessageContent.Text.

Here is the call graph for this function:
@@ -1675,48 +1675,48 @@ Here is the call graph for this function:
-

Definition at line 1203 of file WatchdogBase.cs.

-
1204 {
-
1205 if (result?.ChatResponses != null)
-
1206 {
- -
1208 foreach (var response in result.ChatResponses
-
1209 .Where(response =>
-
1210 {
-
1211 if (response.ChannelIds == null)
-
1212 {
-
1213 if (!warnedMissingChannelIds)
-
1214 {
-
1215 Logger.LogWarning("DMAPI response contains null channelIds!");
-
1216 warnedMissingChannelIds = true;
-
1217 }
-
1218
-
1219 return false;
-
1220 }
-
1221
-
1222 return true;
-
1223 }))
- -
1225 response,
-
1226 response.ChannelIds!
-
1227 .Select(channelIdString =>
-
1228 {
- -
1230 return (ulong?)channelId;
-
1231 else
-
1232 Logger.LogWarning("Could not parse chat response channel ID: {channelID}", channelIdString);
-
1233
-
1234 return null;
-
1235 })
- -
1237 .Select(nullableChannelId => nullableChannelId!.Value));
-
1238 }
-
1239 }
+

Definition at line 1202 of file WatchdogBase.cs.

+
1203 {
+
1204 if (result?.ChatResponses != null)
+
1205 {
+ +
1207 foreach (var response in result.ChatResponses
+
1208 .Where(response =>
+
1209 {
+
1210 if (response.ChannelIds == null)
+
1211 {
+
1212 if (!warnedMissingChannelIds)
+
1213 {
+
1214 Logger.LogWarning("DMAPI response contains null channelIds!");
+
1215 warnedMissingChannelIds = true;
+
1216 }
+
1217
+
1218 return false;
+
1219 }
+
1220
+
1221 return true;
+
1222 }))
+ +
1224 response,
+
1225 response.ChannelIds!
+
1226 .Select(channelIdString =>
+
1227 {
+ +
1229 return (ulong?)channelId;
+
1230 else
+
1231 Logger.LogWarning("Could not parse chat response channel ID: {channelID}", channelIdString);
+
1232
+
1233 return null;
+
1234 })
+ +
1236 .Select(nullableChannelId => nullableChannelId!.Value));
+
1237 }
+
1238 }
void QueueMessage(MessageContent message, IEnumerable< ulong > channelIds)
Queue a chat message to a given set of channelIds .
-

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat, Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, and Tgstation.Server.Host.Components.Chat.IChatManager.QueueMessage().

+

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat, Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, and Tgstation.Server.Host.Components.Chat.IChatManager.QueueMessage().

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleChatCommand(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleEvent().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleChatCommand(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleEvent().

Here is the call graph for this function:
@@ -1857,27 +1857,27 @@ Here is the caller graph for this function:

Implements Tgstation.Server.Host.Components.Events.IEventConsumer.

-

Definition at line 506 of file WatchdogBase.cs.

-
507 {
- -
509
-
510 // Method explicitly implemented to prevent accidental calls when this.eventConsumer should be used.
- -
512
-
513 // Server may have ended
-
514 if (activeServer == null)
-
515 return;
-
516
- -
518 var result = await activeServer.SendCommand(
- - -
521
- -
523 }
+

Definition at line 505 of file WatchdogBase.cs.

+
506 {
+ +
508
+
509 // Method explicitly implemented to prevent accidental calls when this.eventConsumer should be used.
+ +
511
+
512 // Server may have ended
+
513 if (activeServer == null)
+
514 return;
+
515
+ +
517 var result = await activeServer.SendCommand(
+ + +
520
+ +
522 }
Data structure for TopicCommandType.EventNotification requests.
-

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.GetActiveController(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleChatResponses(), and Tgstation.Server.Api.Rights.List.

+

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.GetActiveController(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleChatResponses(), and Tgstation.Server.Api.Rights.List.

Here is the call graph for this function:
@@ -1953,28 +1953,28 @@ Here is the call graph for this function:
Returns
A ValueTask representing the running operation.
-

Definition at line 767 of file WatchdogBase.cs.

-
768 {
-
769 try
-
770 {
-
771 var sessionEventTask = relayToSession ? ((IEventConsumer)this).HandleEvent(eventType, parameters, false, cancellationToken) : ValueTask.CompletedTask;
- - - - -
776 }
-
777 catch (JobException ex)
-
778 {
-
779 Logger.LogError(ex, "Suppressing exception triggered by event!");
-
780 }
-
781 }
+

Definition at line 766 of file WatchdogBase.cs.

+
767 {
+
768 try
+
769 {
+
770 var sessionEventTask = relayToSession ? ((IEventConsumer)this).HandleEvent(eventType, parameters, false, cancellationToken) : ValueTask.CompletedTask;
+ + + + +
775 }
+
776 catch (JobException ex)
+
777 {
+
778 Logger.LogError(ex, "Suppressing exception triggered by event!");
+
779 }
+
780 }
Extension methods for the ValueTask and ValueTask<TResult> classes.
static async ValueTask WhenAll(IEnumerable< ValueTask > tasks)
Fully await a given list of tasks .
Consumes EventTypes and takes the appropriate actions.
-

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.eventConsumer, Tgstation.Server.Host.Components.Events.IEventConsumer.HandleEvent(), Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, and Tgstation.Server.Common.Extensions.ValueTaskExtensions.WhenAll().

+

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.eventConsumer, Tgstation.Server.Host.Components.Events.IEventConsumer.HandleEvent(), Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, and Tgstation.Server.Common.Extensions.ValueTaskExtensions.WhenAll().

-

Referenced by Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.HandleMonitorWakeup(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.TerminateNoLock().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.HandleMonitorWakeup(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.TerminateNoLock().

Here is the call graph for this function:
@@ -2053,96 +2053,96 @@ Here is the caller graph for this function:
Returns
A ValueTask<TResult> resulting in the next MonitorAction to take.
-

Definition at line 1118 of file WatchdogBase.cs.

-
1119 {
-
1120 Logger.LogTrace("Sending health check to active server...");
- -
1122 if (activeServer == null)
-
1123 return MonitorAction.Restart; // uhhhh???
-
1124
- -
1126
-
1127 var shouldShutdown = activeServer.RebootState == Session.RebootState.Shutdown;
-
1128 if (response == null)
-
1129 {
-
1130 switch (++healthChecksMissed)
-
1131 {
-
1132 case 1:
-
1133 Logger.LogDebug("DEFCON 4: Game server missed first health check!");
-
1134 break;
-
1135 case 2:
-
1136 const string message2 = "DEFCON 3: Game server has missed 2 health checks!";
-
1137 Logger.LogInformation(message2);
- -
1139 break;
-
1140 case 3:
- -
1142 ? "shutdown"
-
1143 : "be restarted";
-
1144 const string logTemplate1 = "DEFCON 2: Game server has missed 3 health checks! If it does not respond to the next one, the watchdog will {actionToTake}!";
-
1145 Logger.LogWarning(logTemplate1, actionToTake);
- -
1147 logTemplate1.Replace(
-
1148 "{actionToTake}",
- -
1150 StringComparison.Ordinal));
-
1151 break;
-
1152 case 4:
- -
1154 ? "Shutting down due to graceful termination request"
-
1155 : "Restarting";
-
1156 const string logTemplate2 = "DEFCON 1: Four health checks have been missed! {actionTaken}...";
-
1157 Logger.LogWarning(logTemplate2, actionTaken);
- -
1159 logTemplate2.Replace(
-
1160 "{actionTaken}",
- -
1162 StringComparison.Ordinal));
-
1163
- -
1165 {
-
1166 Logger.LogDebug("DumpOnHealthCheckRestart enabled.");
-
1167 try
-
1168 {
- -
1170 }
-
1171 catch (JobException ex)
-
1172 {
-
1173 Logger.LogWarning(ex, "Creating dump failed!");
-
1174 }
-
1175 catch (Win32Exception ex)
-
1176 {
-
1177 Logger.LogWarning(ex, "Creating dump failed!");
-
1178 }
-
1179 }
-
1180 else
-
1181 Logger.LogTrace("DumpOnHealthCheckRestart disabled.");
-
1182
- - -
1185 default:
-
1186 Logger.LogError("Invalid health checks missed count: {healthChecksMissed}", healthChecksMissed);
-
1187 break;
-
1188 }
-
1189 }
-
1190 else
-
1191 {
- -
1193 ClientCount = response.ClientCount;
-
1194 }
-
1195
-
1196 return MonitorAction.Continue;
-
1197 }
+

Definition at line 1117 of file WatchdogBase.cs.

+
1118 {
+
1119 Logger.LogTrace("Sending health check to active server...");
+ +
1121 if (activeServer == null)
+
1122 return MonitorAction.Restart; // uhhhh???
+
1123
+ +
1125
+
1126 var shouldShutdown = activeServer.RebootState == Session.RebootState.Shutdown;
+
1127 if (response == null)
+
1128 {
+
1129 switch (++healthChecksMissed)
+
1130 {
+
1131 case 1:
+
1132 Logger.LogDebug("DEFCON 4: Game server missed first health check!");
+
1133 break;
+
1134 case 2:
+
1135 const string message2 = "DEFCON 3: Game server has missed 2 health checks!";
+
1136 Logger.LogInformation(message2);
+ +
1138 break;
+
1139 case 3:
+ +
1141 ? "shutdown"
+
1142 : "be restarted";
+
1143 const string logTemplate1 = "DEFCON 2: Game server has missed 3 health checks! If it does not respond to the next one, the watchdog will {actionToTake}!";
+
1144 Logger.LogWarning(logTemplate1, actionToTake);
+ +
1146 logTemplate1.Replace(
+
1147 "{actionToTake}",
+ +
1149 StringComparison.Ordinal));
+
1150 break;
+
1151 case 4:
+ +
1153 ? "Shutting down due to graceful termination request"
+
1154 : "Restarting";
+
1155 const string logTemplate2 = "DEFCON 1: Four health checks have been missed! {actionTaken}...";
+
1156 Logger.LogWarning(logTemplate2, actionTaken);
+ +
1158 logTemplate2.Replace(
+
1159 "{actionTaken}",
+ +
1161 StringComparison.Ordinal));
+
1162
+ +
1164 {
+
1165 Logger.LogDebug("DumpOnHealthCheckRestart enabled.");
+
1166 try
+
1167 {
+ +
1169 }
+
1170 catch (JobException ex)
+
1171 {
+
1172 Logger.LogWarning(ex, "Creating dump failed!");
+
1173 }
+
1174 catch (Win32Exception ex)
+
1175 {
+
1176 Logger.LogWarning(ex, "Creating dump failed!");
+
1177 }
+
1178 }
+
1179 else
+
1180 Logger.LogTrace("DumpOnHealthCheckRestart disabled.");
+
1181
+ + +
1184 default:
+
1185 Logger.LogError("Invalid health checks missed count: {healthChecksMissed}", healthChecksMissed);
+
1186 break;
+
1187 }
+
1188 }
+
1189 else
+
1190 {
+ +
1192 ClientCount = response.ClientCount;
+
1193 }
+
1194
+
1195 return MonitorAction.Continue;
+
1196 }
bool? DumpOnHealthCheckRestart
If a process core dump should be created prior to restarting the watchdog due to health check failure...
-
uint? ClientCount
Last known client count queried from the DMAPI. Requires health checks to be enabled to populate.
-
async ValueTask DisposeAndNullControllers(CancellationToken cancellationToken)
Wrapper for DisposeAndNullControllersImpl under a locked context.
-
int healthChecksMissed
The number of hearbeats missed.
+
uint? ClientCount
Last known client count queried from the DMAPI. Requires health checks to be enabled to populate.
+
async ValueTask DisposeAndNullControllers(CancellationToken cancellationToken)
Wrapper for DisposeAndNullControllersImpl under a locked context.
+
int healthChecksMissed
The number of hearbeats missed.
void QueueWatchdogMessage(string message)
Queue a chat message to configured watchdog channels.
MonitorAction
The action for the monitor loop to take when control is returned to it.
-

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ActiveLaunchParameters, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ClientCount, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.CreateDumpNoLock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAndNullControllers(), Tgstation.Server.Api.Models.Internal.DreamDaemonLaunchParameters.DumpOnHealthCheckRestart, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.GetActiveController(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.healthChecksMissed, Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, and Tgstation.Server.Host.Components.Chat.IChatManager.QueueWatchdogMessage().

+

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ActiveLaunchParameters, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ClientCount, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.CreateDumpNoLock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAndNullControllers(), Tgstation.Server.Api.Models.Internal.DreamDaemonLaunchParameters.DumpOnHealthCheckRestart, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.GetActiveController(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.healthChecksMissed, Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, and Tgstation.Server.Host.Components.Chat.IChatManager.QueueWatchdogMessage().

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes().

Here is the call graph for this function:
@@ -2237,7 +2237,7 @@ Here is the caller graph for this function:
Returns
A ValueTask<TResult> resulting in the MonitorAction to take.
-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes().

Here is the caller graph for this function:
@@ -2307,33 +2307,33 @@ Here is the caller graph for this function:

Implements Tgstation.Server.Host.Core.IRestartHandler.

-

Definition at line 434 of file WatchdogBase.cs.

-
435 {
- -
437 {
- -
439
-
440 if (Status != WatchdogStatus.Offline)
-
441 {
-
442 Logger.LogDebug("Waiting for server to gracefully shut down.");
- -
444 }
-
445 else
-
446 Logger.LogTrace("Graceful shutdown requested but server is already offline.");
-
447
-
448 return;
-
449 }
-
450
-
451 releaseServers = true;
-
452 if (Status == WatchdogStatus.Online)
-
453 Chat.QueueWatchdogMessage("Detaching...");
-
454 else
-
455 Logger.LogTrace("Not sending detach chat message as status is: {status}", Status);
-
456 }
-
async ValueTask Terminate(bool graceful, CancellationToken cancellationToken)
Stops the watchdog.A ValueTask representing the running operation.
-
Task? monitorTask
The Task running the monitor loop.
+

Definition at line 433 of file WatchdogBase.cs.

+
434 {
+ +
436 {
+ +
438
+
439 if (Status != WatchdogStatus.Offline)
+
440 {
+
441 Logger.LogDebug("Waiting for server to gracefully shut down.");
+ +
443 }
+
444 else
+
445 Logger.LogTrace("Graceful shutdown requested but server is already offline.");
+
446
+
447 return;
+
448 }
+
449
+
450 releaseServers = true;
+
451 if (Status == WatchdogStatus.Online)
+
452 Chat.QueueWatchdogMessage("Detaching...");
+
453 else
+
454 Logger.LogTrace("Not sending detach chat message as status is: {status}", Status);
+
455 }
+
async ValueTask Terminate(bool graceful, CancellationToken cancellationToken)
Stops the watchdog.A ValueTask representing the running operation.
+
Task? monitorTask
The Task running the monitor loop.
-

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat, Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.monitorTask, Tgstation.Server.Host.Components.Chat.IChatManager.QueueWatchdogMessage(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.releaseServers, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Status, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Terminate().

+

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat, Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.monitorTask, Tgstation.Server.Host.Components.Chat.IChatManager.QueueWatchdogMessage(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.releaseServers, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Status, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Terminate().

Here is the call graph for this function:
@@ -2415,7 +2415,7 @@ Here is the call graph for this function:
Returns
A Task representing the running operation.
-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ReattachFailure().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ReattachFailure().

Here is the caller graph for this function:
@@ -2477,25 +2477,25 @@ Here is the caller graph for this function:
Returns
A Task that completes if and when a newer CompileJob is available.
-

Definition at line 834 of file WatchdogBase.cs.

-
835 {
- -
837
- - -
840 {
-
841 Logger.LogDebug("Found new CompileJob without waiting");
-
842 return;
-
843 }
-
844
- -
846 }
+

Definition at line 833 of file WatchdogBase.cs.

+
834 {
+ +
836
+ + +
839 {
+
840 Logger.LogDebug("Found new CompileJob without waiting");
+
841 return;
+
842 }
+
843
+ +
845 }
Task OnNewerDmb
Get a Task that completes when the result of a call to LockNextDmb will be different than the previou...
Definition DmbFactory.cs:32
async ValueTask< CompileJob?> LatestCompileJob()
Gets the latest CompileJob.A ValueTask<TResult> resulting in the latest CompileJob or null if none ar...
-

References Tgstation.Server.Host.Components.Deployment.DmbFactory.LatestCompileJob(), Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, and Tgstation.Server.Host.Components.Deployment.DmbFactory.OnNewerDmb.

+

References Tgstation.Server.Host.Components.Deployment.DmbFactory.LatestCompileJob(), Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, and Tgstation.Server.Host.Components.Deployment.DmbFactory.OnNewerDmb.

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes().

Here is the call graph for this function:
@@ -2613,16 +2613,16 @@ Here is the caller graph for this function:

Implements Tgstation.Server.Host.Components.Watchdog.IWatchdog.

-

Definition at line 347 of file WatchdogBase.cs.

-
348 {
-
349 if (Status != WatchdogStatus.Offline)
-
350 throw new JobException(ErrorCode.WatchdogRunning);
- -
352 await LaunchNoLock(true, true, true, null, cancellationToken);
-
353 }
-
async ValueTask LaunchNoLock(bool startMonitor, bool announce, bool announceFailure, ReattachInformation? reattachInfo, CancellationToken cancellationToken)
Launches the watchdog.
+

Definition at line 346 of file WatchdogBase.cs.

+
347 {
+
348 if (Status != WatchdogStatus.Offline)
+
349 throw new JobException(ErrorCode.WatchdogRunning);
+ +
351 await LaunchNoLock(true, true, true, null, cancellationToken);
+
352 }
+
async ValueTask LaunchNoLock(bool startMonitor, bool announce, bool announceFailure, ReattachInformation? reattachInfo, CancellationToken cancellationToken)
Launches the watchdog.
-

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Utils.SemaphoreSlimContext.Lock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Status, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.synchronizationSemaphore.

+

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Utils.SemaphoreSlimContext.Lock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Status, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.synchronizationSemaphore.

Here is the call graph for this function:
@@ -2759,85 +2759,85 @@ Here is the call graph for this function:
Returns
A ValueTask representing the running operation.
-

Definition at line 547 of file WatchdogBase.cs.

-
553 {
-
554 Logger.LogTrace("Begin LaunchImplNoLock");
-
555 if (startMonitor && Status != WatchdogStatus.Offline)
-
556 throw new JobException(ErrorCode.WatchdogRunning);
-
557
-
558 if (reattachInfo == null && !DmbFactory.DmbAvailable)
-
559 throw new JobException(ErrorCode.WatchdogCompileJobCorrupted);
-
560
-
561 // this is necessary, the monitor could be in it's sleep loop trying to restart, if so cancel THAT monitor and start our own with blackjack and hookers
-
562 var eventTask = ValueTask.CompletedTask;
-
563 if (announce)
-
564 {
- -
566 reattachInfo == null
-
567 ? "Launching..."
-
568 : "Reattaching..."); // simple announce
-
569 if (reattachInfo == null)
-
570 eventTask = HandleEventImpl(EventType.WatchdogLaunch, Enumerable.Empty<string>(), false, cancellationToken);
-
571 }
-
572
-
573 // since neither server is running, this is safe to do
- - -
576 ClientCount = null;
-
577
-
578 try
-
579 {
- -
581 }
- -
583 {
-
584 Logger.LogTrace(ex, "Controller initialization cancelled!");
-
585 throw;
-
586 }
-
587 catch (Exception e)
-
588 {
-
589 Logger.LogWarning(e, "Failed to start watchdog!");
- - -
592 {
- -
594 if (announceFailure)
-
595 Chat.QueueWatchdogMessage("Startup failed!");
-
596 }
-
597
- -
599 throw;
-
600 }
-
601 finally
-
602 {
-
603 // finish the chat task that's in flight
-
604 try
-
605 {
- -
607 }
- -
609 {
-
610 Logger.LogTrace(ex, "Announcement task canceled!");
-
611 }
-
612 }
-
613
-
614 Logger.LogInformation("Controller(s) initialized successfully");
-
615
-
616 if (startMonitor)
-
617 {
- - -
620 }
-
621 }
+

Definition at line 546 of file WatchdogBase.cs.

+
552 {
+
553 Logger.LogTrace("Begin LaunchImplNoLock");
+
554 if (startMonitor && Status != WatchdogStatus.Offline)
+
555 throw new JobException(ErrorCode.WatchdogRunning);
+
556
+
557 if (reattachInfo == null && !DmbFactory.DmbAvailable)
+
558 throw new JobException(ErrorCode.WatchdogCompileJobCorrupted);
+
559
+
560 // this is necessary, the monitor could be in it's sleep loop trying to restart, if so cancel THAT monitor and start our own with blackjack and hookers
+
561 var eventTask = ValueTask.CompletedTask;
+
562 if (announce)
+
563 {
+ +
565 reattachInfo == null
+
566 ? "Launching..."
+
567 : "Reattaching..."); // simple announce
+
568 if (reattachInfo == null)
+
569 eventTask = HandleEventImpl(EventType.WatchdogLaunch, Enumerable.Empty<string>(), false, cancellationToken);
+
570 }
+
571
+
572 // since neither server is running, this is safe to do
+ + +
575 ClientCount = null;
+
576
+
577 try
+
578 {
+ +
580 }
+ +
582 {
+
583 Logger.LogTrace(ex, "Controller initialization cancelled!");
+
584 throw;
+
585 }
+
586 catch (Exception e)
+
587 {
+
588 Logger.LogWarning(e, "Failed to start watchdog!");
+ + +
591 {
+ +
593 if (announceFailure)
+
594 Chat.QueueWatchdogMessage("Startup failed!");
+
595 }
+
596
+ +
598 throw;
+
599 }
+
600 finally
+
601 {
+
602 // finish the chat task that's in flight
+
603 try
+
604 {
+ +
606 }
+ +
608 {
+
609 Logger.LogTrace(ex, "Announcement task canceled!");
+
610 }
+
611 }
+
612
+
613 Logger.LogInformation("Controller(s) initialized successfully");
+
614
+
615 if (startMonitor)
+
616 {
+ + +
619 }
+
620 }
bool DmbAvailable
If LockNextDmb will succeed.
Definition DmbFactory.cs:42
-
DreamDaemonLaunchParameters? LastLaunchParameters
The DreamDaemonLaunchParameters the active server is using.This may not be the exact same as ActiveLa...
+
DreamDaemonLaunchParameters? LastLaunchParameters
The DreamDaemonLaunchParameters the active server is using.This may not be the exact same as ActiveLa...
ValueTask InitController(ValueTask eventTask, ReattachInformation? reattachInfo, CancellationToken cancellationToken)
Starts all ISessionControllers.
-
async Task MonitorLifetimes(CancellationToken cancellationToken)
The main loop of the watchdog. Ayschronously waits for events to occur and then responds to them.
-
async ValueTask HandleEventImpl(EventType eventType, IEnumerable< string > parameters, bool relayToSession, CancellationToken cancellationToken)
Handle a given eventType without re-throwing errors.
+
async Task MonitorLifetimes(CancellationToken cancellationToken)
The main loop of the watchdog. Ayschronously waits for events to occur and then responds to them.
+
async ValueTask HandleEventImpl(EventType eventType, IEnumerable< string > parameters, bool relayToSession, CancellationToken cancellationToken)
Handle a given eventType without re-throwing errors.
-

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ActiveLaunchParameters, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ClientCount, Tgstation.Server.Host.Components.Deployment.DmbFactory.DmbAvailable, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleEventImpl(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.healthChecksMissed, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.InitController(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LastLaunchParameters, Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.monitorCts, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.monitorTask, Tgstation.Server.Host.Components.Chat.IChatManager.QueueWatchdogMessage(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Status.

+

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ActiveLaunchParameters, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ClientCount, Tgstation.Server.Host.Components.Deployment.DmbFactory.DmbAvailable, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleEventImpl(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.healthChecksMissed, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.InitController(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LastLaunchParameters, Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.monitorCts, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.monitorTask, Tgstation.Server.Host.Components.Chat.IChatManager.QueueWatchdogMessage(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Status.

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Launch(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorRestart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Restart(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.StartAsync().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Launch(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorRestart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Restart(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.StartAsync().

Here is the call graph for this function:
@@ -2958,233 +2958,233 @@ Here is the caller graph for this function:
Returns
A ValueTask representing the running operation.
-

Definition at line 854 of file WatchdogBase.cs.

-
855 {
-
856 Logger.LogTrace("Entered MonitorLifetimes");
-
857 Status = WatchdogStatus.Online;
-
858 using var cancellationTokenLoggingRegistration = cancellationToken.Register(() => Logger.LogTrace("Monitor cancellationToken triggered"));
-
859
-
860 // this function is responsible for calling HandlerMonitorWakeup when necessary and manitaining the MonitorState
-
861 try
-
862 {
- -
864 Task? activeServerLifetime = null,
-
865 activeServerReboot = null,
-
866 activeServerStartup = null,
-
867 serverPrimed = null,
- -
869 newDmbAvailable = null,
-
870 healthCheck = null;
- -
872 var ranInitialDmbCheck = false;
-
873 for (ulong iteration = 1; nextAction != MonitorAction.Exit; ++iteration)
- -
875 {
-
876 var nextMonitorWakeupTcs = new TaskCompletionSource();
-
877 try
-
878 {
-
879 Logger.LogTrace("Iteration {iteration} of monitor loop", iteration);
-
880 nextAction = MonitorAction.Continue;
-
881
- -
883
- -
885 {
- - -
888 {
-
889 if (sameController && oldTask?.IsCompleted == true)
-
890 return;
-
891
- -
893 }
-
894
-
895 controller!.RebootGate = nextMonitorWakeupTcs.Task;
-
896
- - - - -
901
-
902 if (!sameController)
- -
904
- - - -
908 () =>
-
909 {
- - - -
913 ranInitialDmbCheck = true;
-
914 return result;
-
915 });
-
916 }
-
917
-
918 if (controller != null)
-
919 {
- -
921
- - - - -
926 : Task.Delay(
-
927 TimeSpan.FromSeconds(healthCheckSeconds),
- -
929
-
930 // cancel waiting if requested
-
931 var toWaitOn = Task.WhenAny(
- - - - - - -
938 serverPrimed!);
-
939
-
940 // wait for something to happen
- -
942 }
-
943 else
-
944 {
-
945 Logger.LogError("Controller was null on monitor wakeup! Attempting restart...");
-
946 nextAction = MonitorAction.Restart; // excuse me wtf?
-
947 }
-
948
-
949 cancellationToken.ThrowIfCancellationRequested();
-
950 Logger.LogTrace("Monitor activated");
-
951
-
952 // always run HandleMonitorWakeup from the context of the semaphore lock
- -
954 {
-
955 // Set this sooner so chat sends don't hold us up
- -
957 Status = WatchdogStatus.Restoring;
-
958
-
959 // multiple things may have happened, handle them one at a time
- -
961 {
-
962 MonitorActivationReason activationReason = default; // this will always be assigned before being used
-
963
- -
965 {
-
966 var taskCompleted = task?.IsCompleted == true;
-
967 task = null;
-
968 if (nextAction == MonitorAction.Skip)
-
969 nextAction = MonitorAction.Continue;
-
970 else if (taskCompleted)
-
971 {
- -
973 return true;
-
974 }
-
975
-
976 return false;
-
977 }
-
978
-
979 // process the tasks in this order and call HandlerMonitorWakup for each depending on the new monitorState
- - - - - - - -
987
- -
989
-
990 if (!anyActivation)
- -
992 else
-
993 {
-
994 Logger.LogTrace("Reason: {activationReason}", activationReason);
-
995 if (activationReason == MonitorActivationReason.HealthCheck)
- - -
998 else
- - - -
1002 }
-
1003 }
-
1004 }
-
1005
-
1006 Logger.LogTrace("Next monitor action is to {nextAction}", nextAction);
-
1007
-
1008 // Restart if requested
-
1009 if (nextAction == MonitorAction.Restart)
-
1010 {
- -
1012 nextAction = MonitorAction.Continue;
-
1013 }
-
1014 }
- -
1016 {
-
1017 // really, this should NEVER happen
-
1018 Logger.LogError(
-
1019 e,
-
1020 "Monitor crashed! Iteration: {iteration}",
-
1021 iteration);
-
1022
- -
1024 ? "Recovering"
-
1025 : "Shutting down";
- -
1027 $"Monitor crashed, this should NEVER happen! Please report this, full details in logs! {nextActionMessage}. Error: {e.Message}");
-
1028
-
1029 if (disposed)
- -
1031 else if (nextAction != MonitorAction.Exit)
-
1032 {
-
1033 if (GetActiveController()?.Lifetime.IsCompleted != true)
- -
1035 else
-
1036 Logger.LogDebug("Server seems to be okay, not restarting");
-
1037 nextAction = MonitorAction.Continue;
-
1038 }
-
1039 }
-
1040 finally
-
1041 {
-
1042 nextMonitorWakeupTcs.SetResult();
-
1043 }
-
1044 }
-
1045 }
- -
1047 {
-
1048 // stop signal
-
1049 Logger.LogDebug("Monitor cancelled");
-
1050
-
1051 if (releaseServers)
-
1052 {
-
1053 Logger.LogTrace("Detaching server...");
- -
1055 if (controller != null)
-
1056 await controller.Release();
-
1057 else
-
1058 Logger.LogError("Controller was null on monitor shutdown!");
-
1059 }
-
1060 }
-
1061
-
1062 // DCT: Operation must always run
-
1063 await DisposeAndNullControllers(CancellationToken.None);
-
1064 Status = WatchdogStatus.Offline;
-
1065
-
1066 Logger.LogTrace("Monitor exiting...");
-
1067 }
+

Definition at line 853 of file WatchdogBase.cs.

+
854 {
+
855 Logger.LogTrace("Entered MonitorLifetimes");
+
856 Status = WatchdogStatus.Online;
+
857 using var cancellationTokenLoggingRegistration = cancellationToken.Register(() => Logger.LogTrace("Monitor cancellationToken triggered"));
+
858
+
859 // this function is responsible for calling HandlerMonitorWakeup when necessary and manitaining the MonitorState
+
860 try
+
861 {
+ +
863 Task? activeServerLifetime = null,
+
864 activeServerReboot = null,
+
865 activeServerStartup = null,
+
866 serverPrimed = null,
+ +
868 newDmbAvailable = null,
+
869 healthCheck = null;
+ +
871 var ranInitialDmbCheck = false;
+
872 for (ulong iteration = 1; nextAction != MonitorAction.Exit; ++iteration)
+ +
874 {
+
875 var nextMonitorWakeupTcs = new TaskCompletionSource();
+
876 try
+
877 {
+
878 Logger.LogTrace("Iteration {iteration} of monitor loop", iteration);
+
879 nextAction = MonitorAction.Continue;
+
880
+ +
882
+ +
884 {
+ + +
887 {
+
888 if (sameController && oldTask?.IsCompleted == true)
+
889 return;
+
890
+ +
892 }
+
893
+
894 controller!.RebootGate = nextMonitorWakeupTcs.Task;
+
895
+ + + + +
900
+
901 if (!sameController)
+ +
903
+ + + +
907 () =>
+
908 {
+ + + +
912 ranInitialDmbCheck = true;
+
913 return result;
+
914 });
+
915 }
+
916
+
917 if (controller != null)
+
918 {
+ +
920
+ + + + +
925 : Task.Delay(
+
926 TimeSpan.FromSeconds(healthCheckSeconds),
+ +
928
+
929 // cancel waiting if requested
+
930 var toWaitOn = Task.WhenAny(
+ + + + + + +
937 serverPrimed!);
+
938
+
939 // wait for something to happen
+ +
941 }
+
942 else
+
943 {
+
944 Logger.LogError("Controller was null on monitor wakeup! Attempting restart...");
+
945 nextAction = MonitorAction.Restart; // excuse me wtf?
+
946 }
+
947
+
948 cancellationToken.ThrowIfCancellationRequested();
+
949 Logger.LogTrace("Monitor activated");
+
950
+
951 // always run HandleMonitorWakeup from the context of the semaphore lock
+ +
953 {
+
954 // Set this sooner so chat sends don't hold us up
+ +
956 Status = WatchdogStatus.Restoring;
+
957
+
958 // multiple things may have happened, handle them one at a time
+ +
960 {
+
961 MonitorActivationReason activationReason = default; // this will always be assigned before being used
+
962
+ +
964 {
+
965 var taskCompleted = task?.IsCompleted == true;
+
966 task = null;
+
967 if (nextAction == MonitorAction.Skip)
+
968 nextAction = MonitorAction.Continue;
+
969 else if (taskCompleted)
+
970 {
+ +
972 return true;
+
973 }
+
974
+
975 return false;
+
976 }
+
977
+
978 // process the tasks in this order and call HandlerMonitorWakup for each depending on the new monitorState
+ + + + + + + +
986
+ +
988
+
989 if (!anyActivation)
+ +
991 else
+
992 {
+
993 Logger.LogTrace("Reason: {activationReason}", activationReason);
+
994 if (activationReason == MonitorActivationReason.HealthCheck)
+ + +
997 else
+ + + +
1001 }
+
1002 }
+
1003 }
+
1004
+
1005 Logger.LogTrace("Next monitor action is to {nextAction}", nextAction);
+
1006
+
1007 // Restart if requested
+
1008 if (nextAction == MonitorAction.Restart)
+
1009 {
+ +
1011 nextAction = MonitorAction.Continue;
+
1012 }
+
1013 }
+ +
1015 {
+
1016 // really, this should NEVER happen
+
1017 Logger.LogError(
+
1018 e,
+
1019 "Monitor crashed! Iteration: {iteration}",
+
1020 iteration);
+
1021
+ +
1023 ? "Recovering"
+
1024 : "Shutting down";
+ +
1026 $"Monitor crashed, this should NEVER happen! Please report this, full details in logs! {nextActionMessage}. Error: {e.Message}");
+
1027
+
1028 if (disposed)
+ +
1030 else if (nextAction != MonitorAction.Exit)
+
1031 {
+
1032 if (GetActiveController()?.Lifetime.IsCompleted != true)
+ +
1034 else
+
1035 Logger.LogDebug("Server seems to be okay, not restarting");
+
1036 nextAction = MonitorAction.Continue;
+
1037 }
+
1038 }
+
1039 finally
+
1040 {
+
1041 nextMonitorWakeupTcs.SetResult();
+
1042 }
+
1043 }
+
1044 }
+ +
1046 {
+
1047 // stop signal
+
1048 Logger.LogDebug("Monitor cancelled");
+
1049
+
1050 if (releaseServers)
+
1051 {
+
1052 Logger.LogTrace("Detaching server...");
+ +
1054 if (controller != null)
+
1055 await controller.Release();
+
1056 else
+
1057 Logger.LogError("Controller was null on monitor shutdown!");
+
1058 }
+
1059 }
+
1060
+
1061 // DCT: Operation must always run
+
1062 await DisposeAndNullControllers(CancellationToken.None);
+
1063 Status = WatchdogStatus.Offline;
+
1064
+
1065 Logger.LogTrace("Monitor exiting...");
+
1066 }
uint? HealthCheckSeconds
The number of seconds between each watchdog health check. 0 disables.
-
async ValueTask< MonitorAction > HandleHealthCheck(CancellationToken cancellationToken)
Handles a watchdog health check.
+
async ValueTask< MonitorAction > HandleHealthCheck(CancellationToken cancellationToken)
Handles a watchdog health check.
ValueTask< MonitorAction > HandleMonitorWakeup(MonitorActivationReason activationReason, CancellationToken cancellationToken)
Handles the actions to take when the monitor has to "wake up".
-
async ValueTask MonitorRestart(CancellationToken cancellationToken)
Attempt to restart the monitor from scratch.
-
async Task InitialCheckDmbUpdated(CompileJob currentCompileJob)
Check for a new IDmbProvider.
+
async ValueTask MonitorRestart(CancellationToken cancellationToken)
Attempt to restart the monitor from scratch.
+
async Task InitialCheckDmbUpdated(CompileJob currentCompileJob)
Check for a new IDmbProvider.
Helpers for manipulating the Serilog.Context.LogContext.
const string WatchdogMonitorIterationContextProperty
The Serilog.Context.LogContext property name for the ID of the watchdog monitor iteration currently b...
Handles communication with a DreamDaemon IProcess.
MonitorActivationReason
Reasons for the monitor to wake up.
-

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ActiveLaunchParameters, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.activeParametersUpdated, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAndNullControllers(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.disposed, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.GetActiveController(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleHealthCheck(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleMonitorWakeup(), Tgstation.Server.Api.Models.Internal.DreamDaemonLaunchParameters.HealthCheckSeconds, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.InitialCheckDmbUpdated(), Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Utils.SemaphoreSlimContext.Lock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorRestart(), Tgstation.Server.Host.Components.Chat.IChatManager.QueueWatchdogMessage(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.releaseServers, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Status, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.synchronizationSemaphore, and Tgstation.Server.Host.Utils.SerilogContextHelper.WatchdogMonitorIterationContextProperty.

+

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ActiveLaunchParameters, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.activeParametersUpdated, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAndNullControllers(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.disposed, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.GetActiveController(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleHealthCheck(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleMonitorWakeup(), Tgstation.Server.Api.Models.Internal.DreamDaemonLaunchParameters.HealthCheckSeconds, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.InitialCheckDmbUpdated(), Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Utils.SemaphoreSlimContext.Lock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorRestart(), Tgstation.Server.Host.Components.Chat.IChatManager.QueueWatchdogMessage(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.releaseServers, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Status, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.synchronizationSemaphore, and Tgstation.Server.Host.Utils.SerilogContextHelper.WatchdogMonitorIterationContextProperty.

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock().

Here is the call graph for this function:
@@ -3305,51 +3305,51 @@ Here is the caller graph for this function:
Returns
A ValueTask representing the running operation.
-

Definition at line 788 of file WatchdogBase.cs.

-
789 {
-
790 Logger.LogTrace("Monitor restart!");
-
791
- -
793
-
794 for (var retryAttempts = 1; ; ++retryAttempts)
-
795 {
-
796 Status = WatchdogStatus.Restoring;
- - -
799 try
-
800 {
-
801 // use LaunchImplNoLock without announcements or restarting the monitor
-
802 await LaunchNoLock(false, false, false, null, cancellationToken);
-
803 Status = WatchdogStatus.Online;
-
804 Logger.LogDebug("Relaunch successful, resuming monitor...");
-
805 return;
-
806 }
- -
808 {
- -
810 }
-
811
-
812 Logger.LogWarning(launchException, "Failed to automatically restart the watchdog! Attempt: {attemptNumber}", retryAttempts);
-
813 Status = WatchdogStatus.DelayedRestart;
-
814
-
815 var retryDelay = Math.Min(
-
816 Convert.ToInt32(
-
817 Math.Pow(2, retryAttempts)),
-
818 TimeSpan.FromHours(1).TotalSeconds); // max of one hour, increasing by a power of 2 each time
-
819
- -
821 $"Failed to restart (Attempt: {retryAttempts}), retrying in {retryDelay}s...");
-
822
- -
824 TimeSpan.FromSeconds(retryDelay),
- -
826 }
-
827 }
+

Definition at line 787 of file WatchdogBase.cs.

+
788 {
+
789 Logger.LogTrace("Monitor restart!");
+
790
+ +
792
+
793 for (var retryAttempts = 1; ; ++retryAttempts)
+
794 {
+
795 Status = WatchdogStatus.Restoring;
+ + +
798 try
+
799 {
+
800 // use LaunchImplNoLock without announcements or restarting the monitor
+
801 await LaunchNoLock(false, false, false, null, cancellationToken);
+
802 Status = WatchdogStatus.Online;
+
803 Logger.LogDebug("Relaunch successful, resuming monitor...");
+
804 return;
+
805 }
+ +
807 {
+ +
809 }
+
810
+
811 Logger.LogWarning(launchException, "Failed to automatically restart the watchdog! Attempt: {attemptNumber}", retryAttempts);
+
812 Status = WatchdogStatus.DelayedRestart;
+
813
+
814 var retryDelay = Math.Min(
+
815 Convert.ToInt32(
+
816 Math.Pow(2, retryAttempts)),
+
817 TimeSpan.FromHours(1).TotalSeconds); // max of one hour, increasing by a power of 2 each time
+
818
+ +
820 $"Failed to restart (Attempt: {retryAttempts}), retrying in {retryDelay}s...");
+
821
+ +
823 TimeSpan.FromSeconds(retryDelay),
+ +
825 }
+
826 }
async ValueTask Delay(TimeSpan timeSpan, CancellationToken cancellationToken)
Create a Task that completes after a given timeSpan .A ValueTask representing the running operation.
-

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat, Tgstation.Server.Host.Utils.AsyncDelayer.Delay(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAndNullControllers(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Utils.SemaphoreSlimContext.Lock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, Tgstation.Server.Host.Components.Chat.IChatManager.QueueWatchdogMessage(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Status, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.synchronizationSemaphore.

+

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat, Tgstation.Server.Host.Utils.AsyncDelayer.Delay(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAndNullControllers(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Utils.SemaphoreSlimContext.Lock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, Tgstation.Server.Host.Components.Chat.IChatManager.QueueWatchdogMessage(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Status, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.synchronizationSemaphore.

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes().

Here is the call graph for this function:
@@ -3470,20 +3470,20 @@ Here is the caller graph for this function:
Returns
A ValueTask representing the running operation.
-

Definition at line 669 of file WatchdogBase.cs.

-
670 {
-
671 // we lost the server, just restart entirely
-
672 // DCT: Operation must always run
-
673 await DisposeAndNullControllers(CancellationToken.None);
-
674 ClientCount = null;
-
675 const string FailReattachMessage = "Unable to properly reattach to server! Restarting watchdog...";
-
676 Logger.LogWarning(FailReattachMessage);
-
677
- -
679 await InitController(ValueTask.CompletedTask, null, cancellationToken);
-
680 }
+

Definition at line 668 of file WatchdogBase.cs.

+
669 {
+
670 // we lost the server, just restart entirely
+
671 // DCT: Operation must always run
+
672 await DisposeAndNullControllers(CancellationToken.None);
+
673 ClientCount = null;
+
674 const string FailReattachMessage = "Unable to properly reattach to server! Restarting watchdog...";
+
675 Logger.LogWarning(FailReattachMessage);
+
676
+ +
678 await InitController(ValueTask.CompletedTask, null, cancellationToken);
+
679 }
-

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ClientCount, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAndNullControllers(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.InitController(), Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, and Tgstation.Server.Host.Components.Chat.IChatManager.QueueWatchdogMessage().

+

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ClientCount, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAndNullControllers(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.InitController(), Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, and Tgstation.Server.Host.Components.Chat.IChatManager.QueueWatchdogMessage().

Referenced by Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.InitController().

@@ -3560,19 +3560,19 @@ Here is the caller graph for this function:

Reimplemented in Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.

-

Definition at line 356 of file WatchdogBase.cs.

-
357 {
- -
359 {
-
360 if (Status == WatchdogStatus.Offline)
-
361 return;
- -
363 if (toClear != null)
-
364 await toClear.SetRebootState(Session.RebootState.Normal, cancellationToken);
-
365 }
-
366 }
+

Definition at line 355 of file WatchdogBase.cs.

+
356 {
+ +
358 {
+
359 if (Status == WatchdogStatus.Offline)
+
360 return;
+ +
362 if (toClear != null)
+
363 await toClear.SetRebootState(Session.RebootState.Normal, cancellationToken);
+
364 }
+
365 }
-

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.GetActiveController(), Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Utils.SemaphoreSlimContext.Lock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Status, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.synchronizationSemaphore.

+

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.GetActiveController(), Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Utils.SemaphoreSlimContext.Lock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Status, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.synchronizationSemaphore.

Here is the call graph for this function:
@@ -3626,31 +3626,31 @@ Here is the call graph for this function:

Implements Tgstation.Server.Host.Components.Watchdog.IWatchdog.

-

Definition at line 369 of file WatchdogBase.cs.

-
370 {
-
371 if (Status == WatchdogStatus.Offline)
-
372 throw new JobException(ErrorCode.WatchdogNotRunning);
-
373
-
374 Logger.LogTrace("Begin Restart. Graceful: {gracefulFlag}", graceful);
- -
376 {
-
377 if (!graceful)
-
378 {
-
379 Chat.QueueWatchdogMessage("Manual restart triggered...");
- -
381 await LaunchNoLock(true, false, true, null, cancellationToken);
-
382 return;
-
383 }
-
384
- -
386 if (toReboot != null
-
387 && !await toReboot.SetRebootState(Session.RebootState.Restart, cancellationToken))
-
388 Logger.LogWarning("Unable to send reboot state change event!");
-
389 }
-
390 }
-
async ValueTask TerminateNoLock(bool graceful, bool announce, CancellationToken cancellationToken)
Implementation of Terminate(bool, CancellationToken). Does not lock synchronizationSemaphore.
+

Definition at line 368 of file WatchdogBase.cs.

+
369 {
+
370 if (Status == WatchdogStatus.Offline)
+
371 throw new JobException(ErrorCode.WatchdogNotRunning);
+
372
+
373 Logger.LogTrace("Begin Restart. Graceful: {gracefulFlag}", graceful);
+ +
375 {
+
376 if (!graceful)
+
377 {
+
378 Chat.QueueWatchdogMessage("Manual restart triggered...");
+ +
380 await LaunchNoLock(true, false, true, null, cancellationToken);
+
381 return;
+
382 }
+
383
+ +
385 if (toReboot != null
+
386 && !await toReboot.SetRebootState(Session.RebootState.Restart, cancellationToken))
+
387 Logger.LogWarning("Unable to send reboot state change event!");
+
388 }
+
389 }
+
async ValueTask TerminateNoLock(bool graceful, bool announce, CancellationToken cancellationToken)
Implementation of Terminate(bool, CancellationToken). Does not lock synchronizationSemaphore.
-

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.GetActiveController(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Utils.SemaphoreSlimContext.Lock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, Tgstation.Server.Host.Components.Chat.IChatManager.QueueWatchdogMessage(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Status, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.synchronizationSemaphore, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.TerminateNoLock().

+

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.GetActiveController(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Utils.SemaphoreSlimContext.Lock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, Tgstation.Server.Host.Components.Chat.IChatManager.QueueWatchdogMessage(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Status, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.synchronizationSemaphore, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.TerminateNoLock().

Here is the call graph for this function:
@@ -3749,34 +3749,34 @@ Here is the call graph for this function:

-

Definition at line 393 of file WatchdogBase.cs.

-
394 {
- -
396 var reattaching = reattachInfo != null;
-
397 if (!autoStart && !reattaching)
-
398 return;
-
399
-
400 var job = Models.Job.Create(
- -
402 ? JobCode.StartupWatchdogReattach
- -
404 null,
-
405 metadata,
- - -
408 job,
-
409 async (core, databaseContextFactory, paramJob, progressFunction, ct) =>
-
410 {
-
411 if (core?.Watchdog != this)
-
412 throw new InvalidOperationException(Instance.DifferentCoreExceptionMessage);
-
413
- -
415 await LaunchNoLock(true, true, true, reattachInfo, ct);
-
416
- -
418 },
- -
420 }
+

Definition at line 392 of file WatchdogBase.cs.

+
393 {
+ +
395 var reattaching = reattachInfo != null;
+
396 if (!autoStart && !reattaching)
+
397 return;
+
398
+
399 var job = Models.Job.Create(
+ +
401 ? JobCode.StartupWatchdogReattach
+ +
403 null,
+
404 metadata,
+ + +
407 job,
+
408 async (core, databaseContextFactory, paramJob, progressFunction, ct) =>
+
409 {
+
410 if (core?.Watchdog != this)
+
411 throw new InvalidOperationException(Instance.DifferentCoreExceptionMessage);
+
412
+ +
414 await LaunchNoLock(true, true, true, reattachInfo, ct);
+
415
+ +
417 },
+ +
419 }
Metadata about a server instance.
Definition Instance.cs:9
async ValueTask< ReattachInformation?> Load(CancellationToken cancellationToken)
Load a saved ReattachInformation.A ValueTask<TResult> resulting in the stored ReattachInformation if ...
ValueTask UpdateTrackingContexts(CancellationToken cancellationToken)
Force an update with the active channels on all active IChatTrackingContexts.
@@ -3786,7 +3786,7 @@ Here is the call graph for this function:
DreamDaemonRights
Rights for managing DreamDaemon.
@ Shutdown
User can immediately shutdown the Watchdog.
-

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.autoStart, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat, Tgstation.Server.Host.Components.Instance.DifferentCoreExceptionMessage, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.jobManager, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Components.Session.SessionPersistor.Load(), Tgstation.Server.Host.Utils.SemaphoreSlimContext.Lock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.metadata, Tgstation.Server.Host.Jobs.IJobManager.RegisterOperation(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.synchronizationSemaphore, and Tgstation.Server.Host.Components.Chat.IChatManager.UpdateTrackingContexts().

+

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.autoStart, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat, Tgstation.Server.Host.Components.Instance.DifferentCoreExceptionMessage, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.jobManager, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Components.Session.SessionPersistor.Load(), Tgstation.Server.Host.Utils.SemaphoreSlimContext.Lock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.metadata, Tgstation.Server.Host.Jobs.IJobManager.RegisterOperation(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.synchronizationSemaphore, and Tgstation.Server.Host.Components.Chat.IChatManager.UpdateTrackingContexts().

Here is the call graph for this function:
@@ -3918,24 +3918,24 @@ Here is the call graph for this function:

Stops MonitorLifetimes(CancellationToken). Doesn't kill the servers.

Returns
A ValueTask<TResult> resulting in true if the monitor was running, false otherwise.
-

Definition at line 627 of file WatchdogBase.cs.

-
628 {
-
629 Logger.LogTrace("StopMonitor");
-
630 if (monitorTask == null)
-
631 return false;
-
632 var wasRunning = !monitorTask.IsCompleted;
-
633 monitorCts!.Cancel();
- -
635 Logger.LogTrace("Stopped Monitor");
-
636 monitorCts.Dispose();
-
637 monitorTask = null;
-
638 monitorCts = null;
-
639 return wasRunning;
-
640 }
+

Definition at line 626 of file WatchdogBase.cs.

+
627 {
+
628 Logger.LogTrace("StopMonitor");
+
629 if (monitorTask == null)
+
630 return false;
+
631 var wasRunning = !monitorTask.IsCompleted;
+
632 monitorCts!.Cancel();
+ +
634 Logger.LogTrace("Stopped Monitor");
+
635 monitorCts.Dispose();
+
636 monitorTask = null;
+
637 monitorCts = null;
+
638 return wasRunning;
+
639 }
-

References Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.monitorCts, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.monitorTask.

+

References Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.monitorCts, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.monitorTask.

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.TerminateNoLock().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.TerminateNoLock().

Here is the caller graph for this function:
@@ -3993,15 +3993,15 @@ Here is the caller graph for this function:

Implements Tgstation.Server.Host.Components.Watchdog.IWatchdog.

-

Definition at line 427 of file WatchdogBase.cs.

-
428 {
- - -
431 }
+

Definition at line 426 of file WatchdogBase.cs.

+ -

References Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Utils.SemaphoreSlimContext.Lock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.releaseServers, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.synchronizationSemaphore, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.TerminateNoLock().

+

References Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Utils.SemaphoreSlimContext.Lock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.releaseServers, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.synchronizationSemaphore, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.TerminateNoLock().

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleRestart().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleRestart().

Here is the call graph for this function:
@@ -4090,47 +4090,47 @@ Here is the caller graph for this function:
Returns
A ValueTask representing the running operation.
-

Definition at line 1077 of file WatchdogBase.cs.

-
1078 {
-
1079 if (Status == WatchdogStatus.Offline)
-
1080 return;
-
1081 if (!graceful)
-
1082 {
- - -
1085 ? EventType.WatchdogDetach
- - - - -
1090
-
1091 if (announce)
-
1092 Chat.QueueWatchdogMessage("Shutting down...");
-
1093
- -
1095
- -
1097
-
1098 LastLaunchParameters = null;
-
1099 return;
-
1100 }
-
1101
-
1102 // merely set the reboot state
- -
1104 if (toKill != null)
-
1105 {
-
1106 await toKill.SetRebootState(Session.RebootState.Shutdown, cancellationToken);
-
1107 Logger.LogTrace("Graceful termination requested");
-
1108 }
-
1109 else
-
1110 Logger.LogTrace("Could not gracefully terminate as there is no active controller!");
-
1111 }
-
async ValueTask< bool > StopMonitor()
Stops MonitorLifetimes(CancellationToken). Doesn't kill the servers.
+

Definition at line 1076 of file WatchdogBase.cs.

+
1077 {
+
1078 if (Status == WatchdogStatus.Offline)
+
1079 return;
+
1080 if (!graceful)
+
1081 {
+ + +
1084 ? EventType.WatchdogDetach
+ + + + +
1089
+
1090 if (announce)
+
1091 Chat.QueueWatchdogMessage("Shutting down...");
+
1092
+ +
1094
+ +
1096
+
1097 LastLaunchParameters = null;
+
1098 return;
+
1099 }
+
1100
+
1101 // merely set the reboot state
+ +
1103 if (toKill != null)
+
1104 {
+
1105 await toKill.SetRebootState(Session.RebootState.Shutdown, cancellationToken);
+
1106 Logger.LogTrace("Graceful termination requested");
+
1107 }
+
1108 else
+
1109 Logger.LogTrace("Could not gracefully terminate as there is no active controller!");
+
1110 }
+
async ValueTask< bool > StopMonitor()
Stops MonitorLifetimes(CancellationToken). Doesn't kill the servers.
@ WatchdogShutdown
Before the watchdog shuts down. Not sent for graceful shutdowns. No parameters.
-

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.GetActiveController(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleEventImpl(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LastLaunchParameters, Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, Tgstation.Server.Host.Components.Chat.IChatManager.QueueWatchdogMessage(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.releaseServers, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Status, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.StopMonitor().

+

References Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Chat, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.GetActiveController(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleEventImpl(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LastLaunchParameters, Tgstation.Server.Api.Rights.List, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger, Tgstation.Server.Host.Components.Chat.IChatManager.QueueWatchdogMessage(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.releaseServers, Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Status, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.StopMonitor().

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Restart(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Terminate().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Restart(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Terminate().

Here is the call graph for this function:
@@ -4191,9 +4191,9 @@ Here is the caller graph for this function:

TaskCompletionSource that completes when ActiveLaunchParameters are changed and we are running.

-

Definition at line 160 of file WatchdogBase.cs.

+

Definition at line 159 of file WatchdogBase.cs.

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ChangeSettings(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ChangeSettings(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

@@ -4219,9 +4219,9 @@ Here is the caller graph for this function:

If the WatchdogBase should LaunchNoLock(bool, bool, bool, ReattachInformation, CancellationToken) in StartAsync(CancellationToken).

-

Definition at line 155 of file WatchdogBase.cs.

+

Definition at line 154 of file WatchdogBase.cs.

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.StartAsync(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.StartAsync(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

@@ -4247,9 +4247,9 @@ Here is the caller graph for this function:

SemaphoreSlim used for DisposeAndNullControllers.

-

Definition at line 125 of file WatchdogBase.cs.

+

Definition at line 124 of file WatchdogBase.cs.

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAndNullControllers(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAsync(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAndNullControllers(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAsync(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

@@ -4275,9 +4275,9 @@ Here is the caller graph for this function:

The IIOManager pointing to the Diagnostics directory.

-

Definition at line 145 of file WatchdogBase.cs.

+

Definition at line 144 of file WatchdogBase.cs.

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

@@ -4303,9 +4303,9 @@ Here is the caller graph for this function:

If the WatchdogBase has been DisposeAsync'd.

-

Definition at line 190 of file WatchdogBase.cs.

+

Definition at line 189 of file WatchdogBase.cs.

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAsync(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAsync(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes().

@@ -4331,9 +4331,9 @@ Here is the caller graph for this function:

The IEventConsumer that is not the WatchdogBase.

-

Definition at line 130 of file WatchdogBase.cs.

+

Definition at line 129 of file WatchdogBase.cs.

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.BeforeApplyDmb(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleEventImpl(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.BeforeApplyDmb(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleEventImpl(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

@@ -4359,9 +4359,9 @@ Here is the caller graph for this function:

The number of hearbeats missed.

-

Definition at line 180 of file WatchdogBase.cs.

+

Definition at line 179 of file WatchdogBase.cs.

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleHealthCheck(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleHealthCheck(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock().

@@ -4387,9 +4387,9 @@ Here is the caller graph for this function:

The IJobManager for the WatchdogBase.

-

Definition at line 135 of file WatchdogBase.cs.

+

Definition at line 134 of file WatchdogBase.cs.

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.StartAsync(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.StartAsync(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

@@ -4415,9 +4415,9 @@ Here is the caller graph for this function:

The Api.Models.Instance for the WatchdogBase.

-

Definition at line 115 of file WatchdogBase.cs.

+

Definition at line 114 of file WatchdogBase.cs.

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.BeforeApplyDmb(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.StartAsync(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.BeforeApplyDmb(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.StartAsync(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

@@ -4443,9 +4443,9 @@ Here is the caller graph for this function:

The CancellationTokenSource for the monitor loop.

-

Definition at line 165 of file WatchdogBase.cs.

+

Definition at line 164 of file WatchdogBase.cs.

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAsync(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.StopMonitor().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAsync(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.StopMonitor().

@@ -4471,9 +4471,9 @@ Here is the caller graph for this function:

The Task running the monitor loop.

-

Definition at line 170 of file WatchdogBase.cs.

+

Definition at line 169 of file WatchdogBase.cs.

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleRestart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.StopMonitor().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleRestart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.StopMonitor().

@@ -4499,9 +4499,9 @@ Here is the caller graph for this function:

If the servers should be released instead of shutdown.

-

Definition at line 185 of file WatchdogBase.cs.

+

Definition at line 184 of file WatchdogBase.cs.

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAndNullControllers(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleRestart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Terminate(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.TerminateNoLock(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAndNullControllers(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleRestart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Terminate(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.TerminateNoLock(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

@@ -4527,9 +4527,9 @@ Here is the caller graph for this function:

The IRemoteDeploymentManagerFactory for the WatchdogBase.

-

Definition at line 150 of file WatchdogBase.cs.

+

Definition at line 149 of file WatchdogBase.cs.

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.BeforeApplyDmb(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.BeforeApplyDmb(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

@@ -4555,9 +4555,9 @@ Here is the caller graph for this function:

The IRestartRegistration for the WatchdogBase.

-

Definition at line 140 of file WatchdogBase.cs.

+

Definition at line 139 of file WatchdogBase.cs.

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAsync(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAsync(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

@@ -4583,7 +4583,7 @@ Here is the caller graph for this function:

Backing field for Status.

-

Definition at line 175 of file WatchdogBase.cs.

+

Definition at line 174 of file WatchdogBase.cs.

@@ -4609,9 +4609,9 @@ Here is the caller graph for this function:

The SemaphoreSlim for the WatchdogBase.

-

Definition at line 120 of file WatchdogBase.cs.

+

Definition at line 119 of file WatchdogBase.cs.

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ChangeSettings(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.CreateDump(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAsync(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleChatCommand(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Launch(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorRestart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ResetRebootState(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Restart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.StartAsync(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Terminate(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ChangeSettings(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.CreateDump(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAsync(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleChatCommand(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Launch(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorRestart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ResetRebootState(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Restart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.StartAsync(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Terminate(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

@@ -4640,9 +4640,9 @@ Here is the caller graph for this function:

Implements Tgstation.Server.Host.Components.Watchdog.IWatchdog.

-

Definition at line 72 of file WatchdogBase.cs.

+

Definition at line 71 of file WatchdogBase.cs.

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.BeforeApplyDmb(), and Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.HandleNewDmbAvailable().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.BeforeApplyDmb(), and Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.HandleNewDmbAvailable().

@@ -4670,10 +4670,10 @@ Here is the caller graph for this function:

Implements Tgstation.Server.Host.Components.Watchdog.IWatchdog.

-

Definition at line 66 of file WatchdogBase.cs.

-
66{ get; protected set; }
+

Definition at line 65 of file WatchdogBase.cs.

+
65{ get; protected set; }
-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ChangeSettings(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleHealthCheck(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.HandleNormalReboot(), Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.InitController(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ChangeSettings(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleHealthCheck(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.HandleNormalReboot(), Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.InitController(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

@@ -4701,8 +4701,8 @@ Here is the caller graph for this function:

Implements Tgstation.Server.Host.Components.Watchdog.IWatchdog.

-

Definition at line 63 of file WatchdogBase.cs.

-
63{ get; }
+

Definition at line 62 of file WatchdogBase.cs.

+
62{ get; }
@@ -4728,8 +4728,8 @@ Here is the caller graph for this function:

The IAsyncDelayer for the WatchdogBase.

-

Definition at line 105 of file WatchdogBase.cs.

-
105{ get; }
+

Definition at line 104 of file WatchdogBase.cs.

+
104{ get; }
@@ -4755,10 +4755,10 @@ Here is the caller graph for this function:

The IChatManager for the WatchdogBase.

-

Definition at line 90 of file WatchdogBase.cs.

-
90{ get; }
+

Definition at line 89 of file WatchdogBase.cs.

+
89{ get; }
-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleChatResponses(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleHealthCheck(), Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.HandleMonitorWakeup(), Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.HandleNewDmbAvailable(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.HandleNormalReboot(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleRestart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorRestart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ReattachFailure(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Restart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.StartAsync(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.TerminateNoLock(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleChatResponses(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleHealthCheck(), Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.HandleMonitorWakeup(), Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.HandleNewDmbAvailable(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.HandleNormalReboot(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleRestart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorRestart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ReattachFailure(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Restart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.StartAsync(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.TerminateNoLock(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

@@ -4786,10 +4786,10 @@ Here is the caller graph for this function:

Implements Tgstation.Server.Host.Components.Watchdog.IWatchdog.

-

Definition at line 42 of file WatchdogBase.cs.

-
42{ get; private set; }
+

Definition at line 41 of file WatchdogBase.cs.

+
41{ get; private set; }
-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleHealthCheck(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ReattachFailure().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleHealthCheck(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ReattachFailure().

@@ -4815,8 +4815,8 @@ Here is the caller graph for this function:

The IDmbFactory for the WatchdogBase.

-

Definition at line 100 of file WatchdogBase.cs.

-
100{ get; }
+

Definition at line 99 of file WatchdogBase.cs.

+
99{ get; }
@@ -4842,10 +4842,10 @@ Here is the caller graph for this function:

The IIOManager for the WatchdogBase pointing to the Game directory.

-

Definition at line 110 of file WatchdogBase.cs.

-
110{ get; }
+

Definition at line 109 of file WatchdogBase.cs.

+
109{ get; }
-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

@@ -4873,10 +4873,10 @@ Here is the caller graph for this function:

Implements Tgstation.Server.Host.Components.Watchdog.IWatchdog.

-

Definition at line 69 of file WatchdogBase.cs.

-
69{ get; protected set; }
+

Definition at line 68 of file WatchdogBase.cs.

+
68{ get; protected set; }
-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.TerminateNoLock().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.TerminateNoLock().

@@ -4904,7 +4904,7 @@ Here is the caller graph for this function:

Implements Tgstation.Server.Host.Components.Watchdog.IWatchdog.

-

Definition at line 45 of file WatchdogBase.cs.

+

Definition at line 44 of file WatchdogBase.cs.

@@ -4930,10 +4930,10 @@ Here is the caller graph for this function:

The ILogger for the WatchdogBase.

-

Definition at line 85 of file WatchdogBase.cs.

-
85{ get; }
+

Definition at line 84 of file WatchdogBase.cs.

+
84{ get; }
-

Referenced by Tgstation.Server.Host.Components.Watchdog.WindowsWatchdog.ApplyInitialDmb(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.BeforeApplyDmb(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Broadcast(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.CanUseSwappableDmbProvider(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAndNullControllers(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAsync(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.DrainDeploymentCleanupTasks(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleChatResponses(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleEventImpl(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleHealthCheck(), Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.HandleMonitorWakeup(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.HandleNewDmbAvailable(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.HandleNormalReboot(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleRestart(), Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.InitController(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.InitialCheckDmbUpdated(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.InitialLink(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorRestart(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.PerformDmbSwap(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.PrepServerForLaunch(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ReattachFailure(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Restart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.StopMonitor(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.TerminateNoLock(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WindowsWatchdog.ApplyInitialDmb(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.BeforeApplyDmb(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Broadcast(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.CanUseSwappableDmbProvider(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAndNullControllers(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAsync(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.DrainDeploymentCleanupTasks(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleChatResponses(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleEventImpl(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleHealthCheck(), Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.HandleMonitorWakeup(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.HandleNewDmbAvailable(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.HandleNormalReboot(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleRestart(), Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.InitController(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.InitialCheckDmbUpdated(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.InitialLink(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorRestart(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.PerformDmbSwap(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.PrepServerForLaunch(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ReattachFailure(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Restart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.StopMonitor(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.TerminateNoLock(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

@@ -4961,7 +4961,7 @@ Here is the caller graph for this function:

Implements Tgstation.Server.Host.Components.Watchdog.IWatchdog.

-

Definition at line 60 of file WatchdogBase.cs.

+

Definition at line 59 of file WatchdogBase.cs.

@@ -4989,8 +4989,8 @@ Here is the caller graph for this function:

Implements Tgstation.Server.Host.Components.Watchdog.IWatchdog.

-

Definition at line 75 of file WatchdogBase.cs.

-
75{ get; }
+

Definition at line 74 of file WatchdogBase.cs.

+
74{ get; }
@@ -5016,8 +5016,8 @@ Here is the caller graph for this function:

The ISessionControllerFactory for the WatchdogBase.

-

Definition at line 95 of file WatchdogBase.cs.

-
95{ get; }
+

Definition at line 94 of file WatchdogBase.cs.

+
94{ get; }
@@ -5045,7 +5045,7 @@ Here is the caller graph for this function:

Implements Tgstation.Server.Host.Components.Watchdog.IWatchdog.

-

Definition at line 39 of file WatchdogBase.cs.

+

Definition at line 38 of file WatchdogBase.cs.

Referenced by Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.InitController().

@@ -5073,8 +5073,8 @@ Here is the caller graph for this function:

The ISessionPersistor for the WatchdogBase.

-

Definition at line 80 of file WatchdogBase.cs.

-
80{ get; }
+

Definition at line 79 of file WatchdogBase.cs.

+
79{ get; }
@@ -5102,19 +5102,19 @@ Here is the caller graph for this function:

Implements Tgstation.Server.Host.Components.Watchdog.IWatchdog.

-

Definition at line 48 of file WatchdogBase.cs.

-
49 {
-
50 get => status;
-
51 protected set
-
52 {
-
53 var oldStatus = status;
-
54 status = value;
-
55 Logger.LogTrace("Status set from {oldStatus} to {status}", oldStatus, status);
-
56 }
-
57 }
-
WatchdogStatus status
Backing field for Status.
+

Definition at line 47 of file WatchdogBase.cs.

+
48 {
+
49 get => status;
+
50 protected set
+
51 {
+ +
53 status = value;
+
54 Logger.LogTrace("Status set from {oldStatus} to {status}", oldStatus, status);
+
55 }
+
56 }
+
WatchdogStatus status
Backing field for Status.
-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ChangeSettings(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleChatCommand(), Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.HandleMonitorWakeup(), Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.HandleNormalReboot(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleRestart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Launch(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorRestart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ResetRebootState(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Restart(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.TerminateNoLock().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ChangeSettings(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleChatCommand(), Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.HandleMonitorWakeup(), Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.HandleNormalReboot(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleRestart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Launch(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorRestart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ResetRebootState(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Restart(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.TerminateNoLock().

diff --git a/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_watchdog_1_1_windows_watchdog.html b/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_watchdog_1_1_windows_watchdog.html index 4962b270fa..ba5bbbd56b 100644 --- a/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_watchdog_1_1_windows_watchdog.html +++ b/class_tgstation_1_1_server_1_1_host_1_1_components_1_1_watchdog_1_1_windows_watchdog.html @@ -664,11 +664,11 @@ Additional Inherited Members
77 autoStart)
78 {
79 }
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.jobManager
readonly IJobManager jobManager
The IJobManager for the WatchdogBase.
Definition WatchdogBase.cs:135
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.autoStart
readonly bool autoStart
If the WatchdogBase should LaunchNoLock(bool, bool, bool, ReattachInformation, CancellationToken) in ...
Definition WatchdogBase.cs:155
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.eventConsumer
readonly IEventConsumer eventConsumer
The IEventConsumer that is not the WatchdogBase.
Definition WatchdogBase.cs:130
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.remoteDeploymentManagerFactory
readonly IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory
The IRemoteDeploymentManagerFactory for the WatchdogBase.
Definition WatchdogBase.cs:150
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.diagnosticsIOManager
readonly IIOManager diagnosticsIOManager
The IIOManager pointing to the Diagnostics directory.
Definition WatchdogBase.cs:145
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.jobManager
readonly IJobManager jobManager
The IJobManager for the WatchdogBase.
Definition WatchdogBase.cs:134
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.autoStart
readonly bool autoStart
If the WatchdogBase should LaunchNoLock(bool, bool, bool, ReattachInformation, CancellationToken) in ...
Definition WatchdogBase.cs:154
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.eventConsumer
readonly IEventConsumer eventConsumer
The IEventConsumer that is not the WatchdogBase.
Definition WatchdogBase.cs:129
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.remoteDeploymentManagerFactory
readonly IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory
The IRemoteDeploymentManagerFactory for the WatchdogBase.
Definition WatchdogBase.cs:149
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.diagnosticsIOManager
readonly IIOManager diagnosticsIOManager
The IIOManager pointing to the Diagnostics directory.
Definition WatchdogBase.cs:144
@@ -714,12 +714,12 @@ Additional Inherited Members
Tgstation.Server.Host.Components.Deployment.DmbFactory
Standard IDmbFactory.
Definition DmbFactory.cs:29
Tgstation.Server.Host.Components.Deployment.DmbFactory.FromCompileJob
async ValueTask< IDmbProvider?> FromCompileJob(CompileJob compileJob, string reason, CancellationToken cancellationToken, [CallerFilePath] string? callerFile=null, [CallerLineNumber] int callerLine=default)
Gets a IDmbProvider for a given CompileJob.A ValueTask<TResult> resulting in a new IDmbProvider repre...
Definition DmbFactory.cs:252
Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.Server
ISessionController? Server
The single ISessionController.
Definition BasicWatchdog.cs:36
-
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger
ILogger< WatchdogBase > Logger
The ILogger for the WatchdogBase.
Definition WatchdogBase.cs:85
+
Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger
ILogger< WatchdogBase > Logger
The ILogger for the WatchdogBase.
Definition WatchdogBase.cs:84
Tgstation.Server.Host.Components.Session.ISessionController.CompileJob
Models.CompileJob CompileJob
Gets the CompileJob associated with the ISessionController.
Definition ISessionController.cs:40
Tgstation.Server.Host.Components.Session.ISessionController.EngineVersion
EngineVersion EngineVersion
Gets the Api.Models.EngineVersion associated with the ISessionController.
Definition ISessionController.cs:45
Tgstation.Server.Api.Models.EngineType
EngineType
The type of engine the codebase is using.
Definition EngineType.cs:7
-

References Tgstation.Server.Api.Models.EngineVersion.Engine, Tgstation.Server.Host.Components.Deployment.DmbFactory.FromCompileJob(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger.

+

References Tgstation.Server.Api.Models.EngineVersion.Engine, Tgstation.Server.Host.Components.Deployment.DmbFactory.FromCompileJob(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Logger.

Here is the call graph for this function:
diff --git a/class_tgstation_1_1_server_1_1_host_1_1_core_1_1_application.html b/class_tgstation_1_1_server_1_1_host_1_1_core_1_1_application.html index c12cc95a8c..30b47f2071 100644 --- a/class_tgstation_1_1_server_1_1_host_1_1_core_1_1_application.html +++ b/class_tgstation_1_1_server_1_1_host_1_1_core_1_1_application.html @@ -1207,7 +1207,7 @@ Here is the caller graph for this function:
Tgstation.Server.Host.IO.PosixPostWriteHandler
IPostWriteHandler for POSIX systems.
Definition PosixPostWriteHandler.cs:13
Tgstation.Server.Host.IO.ResolvingIOManager
An IIOManager that resolve relative paths from another IIOManager to a subdirectory of that.
Definition ResolvingIOManager.cs:10
Tgstation.Server.Host.IO.SynchronousIOManager
Definition SynchronousIOManager.cs:15
- +
Tgstation.Server.Host.IO.WindowsPostWriteHandler
IPostWriteHandler for Windows systems.
Definition WindowsPostWriteHandler.cs:9
Tgstation.Server.Host.Jobs.JobService
Definition JobService.cs:29
Tgstation.Server.Host.Jobs.JobsHubGroupMapper
Handles mapping groups for the JobsHub.
Definition JobsHubGroupMapper.cs:24
@@ -1227,7 +1227,7 @@ Here is the caller graph for this function:
Tgstation.Server.Host.System.PosixSignalHandler
Handles POSIX signals.
Definition PosixSignalHandler.cs:19
Tgstation.Server.Host.System.ProcessExecutor
Definition ProcessExecutor.cs:19
Tgstation.Server.Host.System.SystemDManager
Implements the SystemD notify service protocol.
Definition SystemDManager.cs:20
-
Tgstation.Server.Host.System.WindowsNetworkPromptReaper
Definition WindowsNetworkPromptReaper.cs:20
+
Tgstation.Server.Host.System.WindowsNetworkPromptReaper
Definition WindowsNetworkPromptReaper.cs:19
Tgstation.Server.Host.System.WindowsProcessFeatures
Definition WindowsProcessFeatures.cs:23
Tgstation.Server.Host.Transfer.FileTransferService
Implementation of the file transfer service.
Definition FileTransferService.cs:21
Tgstation.Server.Host.Utils.AbstractHttpClientFactory
Definition AbstractHttpClientFactory.cs:13
diff --git a/class_tgstation_1_1_server_1_1_host_1_1_i_o_1_1_windows_filesystem_link_factory.html b/class_tgstation_1_1_server_1_1_host_1_1_i_o_1_1_windows_filesystem_link_factory.html index 84f663d023..ae12ca4284 100644 --- a/class_tgstation_1_1_server_1_1_host_1_1_i_o_1_1_windows_filesystem_link_factory.html +++ b/class_tgstation_1_1_server_1_1_host_1_1_i_o_1_1_windows_filesystem_link_factory.html @@ -142,7 +142,7 @@ Properties

Detailed Description

IFilesystemLinkFactory for windows systems.

-

Definition at line 15 of file WindowsFilesystemLinkFactory.cs.

+

Definition at line 14 of file WindowsFilesystemLinkFactory.cs.

Member Function Documentation

◆ CreateHardLink()

@@ -275,7 +275,7 @@ Here is the call graph for this function:

Implements Tgstation.Server.Host.IO.IFilesystemLinkFactory.

-

Definition at line 18 of file WindowsFilesystemLinkFactory.cs.

+

Definition at line 17 of file WindowsFilesystemLinkFactory.cs.

diff --git a/class_tgstation_1_1_server_1_1_host_1_1_service_1_1_wix_1_1_extensions_1_1_installation_extensions.html b/class_tgstation_1_1_server_1_1_host_1_1_service_1_1_wix_1_1_extensions_1_1_installation_extensions.html index 89efbea833..de2e2548e7 100644 --- a/class_tgstation_1_1_server_1_1_host_1_1_service_1_1_wix_1_1_extensions_1_1_installation_extensions.html +++ b/class_tgstation_1_1_server_1_1_host_1_1_service_1_1_wix_1_1_extensions_1_1_installation_extensions.html @@ -323,7 +323,7 @@ Here is the call graph for this function:

Package name.

-

As much as I'd like to use Tgstation.Server.Common.Constants.CanonicalPackageName here, attempting to reference it makes Tgstation.Server.Migrator.Comms fail due to referencing the net2.0 version of that library. EVEN THOUGH IT'S A TRANSITIVE DEPENDENCY OF Tgstation.Server.Client!!!!! If that dead-ass tool has been removed, feel free to do this.

+

As much as I'd like to use Tgstation.Server.Common.Constants.CanonicalPackageName here, attempting to reference it makes VS go crazy with fake errors.

Definition at line 20 of file InstallationExtensions.cs.

diff --git a/class_tgstation_1_1_server_1_1_host_1_1_system_1_1_native_methods.html b/class_tgstation_1_1_server_1_1_host_1_1_system_1_1_native_methods.html index e74ae4ee69..566b68aeff 100644 --- a/class_tgstation_1_1_server_1_1_host_1_1_system_1_1_native_methods.html +++ b/class_tgstation_1_1_server_1_1_host_1_1_system_1_1_native_methods.html @@ -369,7 +369,7 @@ Here is the caller graph for this function:

See https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-enumchildwindows.

-

Referenced by Tgstation.Server.Host.System.WindowsNetworkPromptReaper.GetAllChildHandles().

+

Referenced by Tgstation.Server.Host.System.WindowsNetworkPromptReaper.GetAllChildHandles().

Here is the caller graph for this function:
@@ -443,7 +443,7 @@ Here is the caller graph for this function:

See https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-findwindoww.

-

Referenced by Tgstation.Server.Host.System.WindowsNetworkPromptReaper.ExecuteAsync().

+

Referenced by Tgstation.Server.Host.System.WindowsNetworkPromptReaper.ExecuteAsync().

Here is the caller graph for this function:
@@ -491,7 +491,7 @@ Here is the caller graph for this function:

See https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-getwindowtextw.

-

Referenced by Tgstation.Server.Host.System.WindowsNetworkPromptReaper.ExecuteAsync().

+

Referenced by Tgstation.Server.Host.System.WindowsNetworkPromptReaper.ExecuteAsync().

Here is the caller graph for this function:
@@ -533,7 +533,7 @@ Here is the caller graph for this function:

See https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-getwindowthreadprocessid.

-

Referenced by Tgstation.Server.Host.System.WindowsNetworkPromptReaper.ExecuteAsync().

+

Referenced by Tgstation.Server.Host.System.WindowsNetworkPromptReaper.ExecuteAsync().

Here is the caller graph for this function:
@@ -851,7 +851,7 @@ Here is the caller graph for this function:

See https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-sendmessage.

-

Referenced by Tgstation.Server.Host.System.WindowsNetworkPromptReaper.ExecuteAsync().

+

Referenced by Tgstation.Server.Host.System.WindowsNetworkPromptReaper.ExecuteAsync().

Here is the caller graph for this function:
diff --git a/class_tgstation_1_1_server_1_1_host_1_1_system_1_1_windows_network_prompt_reaper.html b/class_tgstation_1_1_server_1_1_host_1_1_system_1_1_windows_network_prompt_reaper.html index 76eb68a565..6ef52cb6c2 100644 --- a/class_tgstation_1_1_server_1_1_host_1_1_system_1_1_windows_network_prompt_reaper.html +++ b/class_tgstation_1_1_server_1_1_host_1_1_system_1_1_windows_network_prompt_reaper.html @@ -172,7 +172,7 @@ Static Private Attributes

Detailed Description

-

Definition at line 19 of file WindowsNetworkPromptReaper.cs.

+

Definition at line 18 of file WindowsNetworkPromptReaper.cs.

Constructor & Destructor Documentation

◆ WindowsNetworkPromptReaper()

@@ -209,18 +209,18 @@ Static Private Attributes -

Definition at line 93 of file WindowsNetworkPromptReaper.cs.

-
94 {
-
95 this.asyncDelayer = asyncDelayer ?? throw new ArgumentNullException(nameof(asyncDelayer));
-
96 this.logger = logger ?? throw new ArgumentNullException(nameof(logger));
-
97
-
98 registeredProcesses = new List<IProcess>();
-
99 }
-
readonly ILogger< WindowsNetworkPromptReaper > logger
The ILogger for the WindowsNetworkPromptReaper.
-
readonly IAsyncDelayer asyncDelayer
The IAsyncDelayer for the WindowsNetworkPromptReaper.
-
readonly List< IProcess > registeredProcesses
The list of IProcesss registered.
+

Definition at line 92 of file WindowsNetworkPromptReaper.cs.

+
93 {
+
94 this.asyncDelayer = asyncDelayer ?? throw new ArgumentNullException(nameof(asyncDelayer));
+
95 this.logger = logger ?? throw new ArgumentNullException(nameof(logger));
+
96
+
97 registeredProcesses = new List<IProcess>();
+
98 }
+
readonly ILogger< WindowsNetworkPromptReaper > logger
The ILogger for the WindowsNetworkPromptReaper.
+
readonly IAsyncDelayer asyncDelayer
The IAsyncDelayer for the WindowsNetworkPromptReaper.
+
readonly List< IProcess > registeredProcesses
The list of IProcesss registered.
-

References Tgstation.Server.Host.System.WindowsNetworkPromptReaper.asyncDelayer, Tgstation.Server.Host.System.WindowsNetworkPromptReaper.logger, and Tgstation.Server.Host.System.WindowsNetworkPromptReaper.registeredProcesses.

+

References Tgstation.Server.Host.System.WindowsNetworkPromptReaper.asyncDelayer, Tgstation.Server.Host.System.WindowsNetworkPromptReaper.logger, and Tgstation.Server.Host.System.WindowsNetworkPromptReaper.registeredProcesses.

@@ -269,20 +269,20 @@ Static Private Attributes
Returns
true if enumeration should continue, false otherwise.
-

Definition at line 52 of file WindowsNetworkPromptReaper.cs.

-
53 {
-
54 var gcChildhandlesList = GCHandle.FromIntPtr(lParam);
-
55
-
56 if (gcChildhandlesList.Target == null)
-
57 return false;
-
58
-
59 var childHandles = (List<IntPtr>)gcChildhandlesList.Target;
-
60 childHandles.Add(hWnd);
-
61
-
62 return true;
-
63 }
+

Definition at line 51 of file WindowsNetworkPromptReaper.cs.

+
52 {
+
53 var gcChildhandlesList = GCHandle.FromIntPtr(lParam);
+
54
+
55 if (gcChildhandlesList.Target == null)
+
56 return false;
+
57
+
58 var childHandles = (List<IntPtr>)gcChildhandlesList.Target;
+
59 childHandles.Add(hWnd);
+
60
+
61 return true;
+
62 }
-

Referenced by Tgstation.Server.Host.System.WindowsNetworkPromptReaper.GetAllChildHandles().

+

Referenced by Tgstation.Server.Host.System.WindowsNetworkPromptReaper.GetAllChildHandles().

Here is the caller graph for this function:
@@ -324,82 +324,82 @@ Here is the caller graph for this function:

-

Definition at line 125 of file WindowsNetworkPromptReaper.cs.

-
126 {
-
127 logger.LogDebug("Starting network prompt reaper...");
-
128 try
-
129 {
-
130 while (!cancellationToken.IsCancellationRequested)
-
131 {
-
132 await asyncDelayer.Delay(TimeSpan.FromMilliseconds(RecheckDelayMs), cancellationToken);
-
133
-
134 IntPtr window;
-
135 int processId;
- -
137 {
-
138 if (registeredProcesses.Count == 0)
-
139 continue;
-
140
-
141 window = NativeMethods.FindWindow(null, "Network Accessibility");
-
142 if (window == IntPtr.Zero)
-
143 continue;
-
144
-
145 // found a bitch
-
146 var threadId = NativeMethods.GetWindowThreadProcessId(window, out processId);
-
147 if (!registeredProcesses.Any(x => x.Id == processId))
-
148 continue; // not our bitch
-
149 }
-
150
-
151 logger.LogTrace("Identified \"Network Accessibility\" window in owned process {pid}", processId);
-
152
-
153 var found = false;
-
154 foreach (var childHandle in GetAllChildHandles(window))
-
155 {
-
156 const int MaxLength = 10;
-
157 var stringBuilder = new StringBuilder(MaxLength + 1);
-
158
-
159 if (NativeMethods.GetWindowText(childHandle, stringBuilder, MaxLength) == 0)
-
160 {
-
161 logger.LogWarning(new Win32Exception(), "Error calling GetWindowText!");
-
162 continue;
-
163 }
-
164
-
165 var windowText = stringBuilder.ToString();
-
166 if (windowText == "Yes")
-
167 {
-
168 // smash_button_meme.jpg
-
169 logger.LogTrace("Sending \"Yes\" button clicks...");
-
170 for (var iteration = 0; iteration < SendMessageCount; ++iteration)
-
171 {
-
172 const int BM_CLICK = 0x00F5;
-
173 var result = NativeMethods.SendMessage(childHandle, BM_CLICK, IntPtr.Zero, IntPtr.Zero);
-
174 }
-
175
-
176 found = true;
-
177 break;
-
178 }
-
179 }
-
180
-
181 if (!found)
-
182 logger.LogDebug("Unable to find \"Yes\" button for \"Network Accessibility\" window in owned process {pid}!", processId);
-
183 }
-
184 }
-
185 catch (OperationCanceledException ex)
-
186 {
-
187 logger.LogTrace(ex, "Cancelled!");
-
188 }
-
189 finally
-
190 {
-
191 registeredProcesses.Clear();
-
192 logger.LogTrace("Exiting network prompt reaper...");
-
193 }
-
194 }
-
const int SendMessageCount
Number of times to send the button click message. Should be at least 2 or it may fail to focus the wi...
-
const int RecheckDelayMs
Check for prompts each time this amount of milliseconds pass.
-
static List< IntPtr > GetAllChildHandles(IntPtr mainWindow)
Get all the child windows handles of a given mainWindow .
+

Definition at line 124 of file WindowsNetworkPromptReaper.cs.

+
125 {
+
126 logger.LogDebug("Starting network prompt reaper...");
+
127 try
+
128 {
+
129 while (!cancellationToken.IsCancellationRequested)
+
130 {
+
131 await asyncDelayer.Delay(TimeSpan.FromMilliseconds(RecheckDelayMs), cancellationToken);
+
132
+
133 IntPtr window;
+
134 int processId;
+ +
136 {
+
137 if (registeredProcesses.Count == 0)
+
138 continue;
+
139
+
140 window = NativeMethods.FindWindow(null, "Network Accessibility");
+
141 if (window == IntPtr.Zero)
+
142 continue;
+
143
+
144 // found a bitch
+
145 var threadId = NativeMethods.GetWindowThreadProcessId(window, out processId);
+
146 if (!registeredProcesses.Any(x => x.Id == processId))
+
147 continue; // not our bitch
+
148 }
+
149
+
150 logger.LogTrace("Identified \"Network Accessibility\" window in owned process {pid}", processId);
+
151
+
152 var found = false;
+
153 foreach (var childHandle in GetAllChildHandles(window))
+
154 {
+
155 const int MaxLength = 10;
+
156 var stringBuilder = new StringBuilder(MaxLength + 1);
+
157
+
158 if (NativeMethods.GetWindowText(childHandle, stringBuilder, MaxLength) == 0)
+
159 {
+
160 logger.LogWarning(new Win32Exception(), "Error calling GetWindowText!");
+
161 continue;
+
162 }
+
163
+
164 var windowText = stringBuilder.ToString();
+
165 if (windowText == "Yes")
+
166 {
+
167 // smash_button_meme.jpg
+
168 logger.LogTrace("Sending \"Yes\" button clicks...");
+
169 for (var iteration = 0; iteration < SendMessageCount; ++iteration)
+
170 {
+
171 const int BM_CLICK = 0x00F5;
+
172 var result = NativeMethods.SendMessage(childHandle, BM_CLICK, IntPtr.Zero, IntPtr.Zero);
+
173 }
+
174
+
175 found = true;
+
176 break;
+
177 }
+
178 }
+
179
+
180 if (!found)
+
181 logger.LogDebug("Unable to find \"Yes\" button for \"Network Accessibility\" window in owned process {pid}!", processId);
+
182 }
+
183 }
+
184 catch (OperationCanceledException ex)
+
185 {
+
186 logger.LogTrace(ex, "Cancelled!");
+
187 }
+
188 finally
+
189 {
+
190 registeredProcesses.Clear();
+
191 logger.LogTrace("Exiting network prompt reaper...");
+
192 }
+
193 }
+
const int SendMessageCount
Number of times to send the button click message. Should be at least 2 or it may fail to focus the wi...
+
const int RecheckDelayMs
Check for prompts each time this amount of milliseconds pass.
+
static List< IntPtr > GetAllChildHandles(IntPtr mainWindow)
Get all the child windows handles of a given mainWindow .
ValueTask Delay(TimeSpan timeSpan, CancellationToken cancellationToken)
Create a Task that completes after a given timeSpan .
-

References Tgstation.Server.Host.System.WindowsNetworkPromptReaper.asyncDelayer, Tgstation.Server.Host.Utils.IAsyncDelayer.Delay(), Tgstation.Server.Host.System.NativeMethods.FindWindow(), Tgstation.Server.Host.System.WindowsNetworkPromptReaper.GetAllChildHandles(), Tgstation.Server.Host.System.NativeMethods.GetWindowText(), Tgstation.Server.Host.System.NativeMethods.GetWindowThreadProcessId(), Tgstation.Server.Host.System.WindowsNetworkPromptReaper.logger, Tgstation.Server.Host.System.WindowsNetworkPromptReaper.RecheckDelayMs, Tgstation.Server.Host.System.WindowsNetworkPromptReaper.registeredProcesses, Tgstation.Server.Host.System.NativeMethods.SendMessage(), and Tgstation.Server.Host.System.WindowsNetworkPromptReaper.SendMessageCount.

+

References Tgstation.Server.Host.System.WindowsNetworkPromptReaper.asyncDelayer, Tgstation.Server.Host.Utils.IAsyncDelayer.Delay(), Tgstation.Server.Host.System.NativeMethods.FindWindow(), Tgstation.Server.Host.System.WindowsNetworkPromptReaper.GetAllChildHandles(), Tgstation.Server.Host.System.NativeMethods.GetWindowText(), Tgstation.Server.Host.System.NativeMethods.GetWindowThreadProcessId(), Tgstation.Server.Host.System.WindowsNetworkPromptReaper.logger, Tgstation.Server.Host.System.WindowsNetworkPromptReaper.RecheckDelayMs, Tgstation.Server.Host.System.WindowsNetworkPromptReaper.registeredProcesses, Tgstation.Server.Host.System.NativeMethods.SendMessage(), and Tgstation.Server.Host.System.WindowsNetworkPromptReaper.SendMessageCount.

Here is the call graph for this function:
@@ -460,28 +460,28 @@ Here is the call graph for this function:
Returns
A List<T> of all the child handles of mainWindow .
-

Definition at line 70 of file WindowsNetworkPromptReaper.cs.

-
71 {
-
72 var childHandles = new List<IntPtr>();
-
73 var gcChildhandlesList = GCHandle.Alloc(childHandles);
-
74 try
-
75 {
-
76 var pointerChildHandlesList = GCHandle.ToIntPtr(gcChildhandlesList);
-
77 NativeMethods.EnumWindowProc childProc = new(EnumWindow);
-
78 NativeMethods.EnumChildWindows(mainWindow, childProc, pointerChildHandlesList);
-
79 }
-
80 finally
-
81 {
-
82 gcChildhandlesList.Free();
-
83 }
-
84
-
85 return childHandles;
-
86 }
-
static bool EnumWindow(IntPtr hWnd, IntPtr lParam)
Callback for NativeMethods.EnumChildWindows(IntPtr, NativeMethods.EnumWindowProc, IntPtr).
+

Definition at line 69 of file WindowsNetworkPromptReaper.cs.

+
70 {
+
71 var childHandles = new List<IntPtr>();
+
72 var gcChildhandlesList = GCHandle.Alloc(childHandles);
+
73 try
+
74 {
+
75 var pointerChildHandlesList = GCHandle.ToIntPtr(gcChildhandlesList);
+
76 NativeMethods.EnumWindowProc childProc = new(EnumWindow);
+
77 NativeMethods.EnumChildWindows(mainWindow, childProc, pointerChildHandlesList);
+
78 }
+
79 finally
+
80 {
+
81 gcChildhandlesList.Free();
+
82 }
+
83
+
84 return childHandles;
+
85 }
+
static bool EnumWindow(IntPtr hWnd, IntPtr lParam)
Callback for NativeMethods.EnumChildWindows(IntPtr, NativeMethods.EnumWindowProc, IntPtr).
-

References Tgstation.Server.Host.System.NativeMethods.EnumChildWindows(), and Tgstation.Server.Host.System.WindowsNetworkPromptReaper.EnumWindow().

+

References Tgstation.Server.Host.System.NativeMethods.EnumChildWindows(), and Tgstation.Server.Host.System.WindowsNetworkPromptReaper.EnumWindow().

-

Referenced by Tgstation.Server.Host.System.WindowsNetworkPromptReaper.ExecuteAsync().

+

Referenced by Tgstation.Server.Host.System.WindowsNetworkPromptReaper.ExecuteAsync().

Here is the call graph for this function:
@@ -533,29 +533,29 @@ Here is the caller graph for this function:

Implements Tgstation.Server.Host.System.INetworkPromptReaper.

-

Definition at line 102 of file WindowsNetworkPromptReaper.cs.

-
103 {
-
104 ArgumentNullException.ThrowIfNull(process);
-
105
- -
107 {
-
108 if (registeredProcesses.Contains(process))
-
109 throw new InvalidOperationException("This process has already been registered for network prompt reaping!");
-
110 logger.LogTrace("Registering process {pid}...", process.Id);
-
111 registeredProcesses.Add(process);
-
112 }
-
113
-
114 process.Lifetime.ContinueWith(
-
115 x =>
-
116 {
-
117 logger.LogTrace("Unregistering process {pid}...", process.Id);
- -
119 registeredProcesses.Remove(process);
-
120 },
-
121 TaskScheduler.Current);
-
122 }
+

Definition at line 101 of file WindowsNetworkPromptReaper.cs.

+
102 {
+
103 ArgumentNullException.ThrowIfNull(process);
+
104
+ +
106 {
+
107 if (registeredProcesses.Contains(process))
+
108 throw new InvalidOperationException("This process has already been registered for network prompt reaping!");
+
109 logger.LogTrace("Registering process {pid}...", process.Id);
+
110 registeredProcesses.Add(process);
+
111 }
+
112
+
113 process.Lifetime.ContinueWith(
+
114 x =>
+
115 {
+
116 logger.LogTrace("Unregistering process {pid}...", process.Id);
+ +
118 registeredProcesses.Remove(process);
+
119 },
+
120 TaskScheduler.Current);
+
121 }
-

References Tgstation.Server.Host.System.IProcess.Id, Tgstation.Server.Host.System.IProcessBase.Lifetime, Tgstation.Server.Host.System.WindowsNetworkPromptReaper.logger, and Tgstation.Server.Host.System.WindowsNetworkPromptReaper.registeredProcesses.

+

References Tgstation.Server.Host.System.IProcess.Id, Tgstation.Server.Host.System.IProcessBase.Lifetime, Tgstation.Server.Host.System.WindowsNetworkPromptReaper.logger, and Tgstation.Server.Host.System.WindowsNetworkPromptReaper.registeredProcesses.

@@ -582,9 +582,9 @@ Here is the caller graph for this function:

The IAsyncDelayer for the WindowsNetworkPromptReaper.

-

Definition at line 34 of file WindowsNetworkPromptReaper.cs.

+

Definition at line 33 of file WindowsNetworkPromptReaper.cs.

-

Referenced by Tgstation.Server.Host.System.WindowsNetworkPromptReaper.ExecuteAsync(), and Tgstation.Server.Host.System.WindowsNetworkPromptReaper.WindowsNetworkPromptReaper().

+

Referenced by Tgstation.Server.Host.System.WindowsNetworkPromptReaper.ExecuteAsync(), and Tgstation.Server.Host.System.WindowsNetworkPromptReaper.WindowsNetworkPromptReaper().

@@ -610,9 +610,9 @@ Here is the caller graph for this function:

The ILogger for the WindowsNetworkPromptReaper.

-

Definition at line 39 of file WindowsNetworkPromptReaper.cs.

+

Definition at line 38 of file WindowsNetworkPromptReaper.cs.

-

Referenced by Tgstation.Server.Host.System.WindowsNetworkPromptReaper.ExecuteAsync(), Tgstation.Server.Host.System.WindowsNetworkPromptReaper.RegisterProcess(), and Tgstation.Server.Host.System.WindowsNetworkPromptReaper.WindowsNetworkPromptReaper().

+

Referenced by Tgstation.Server.Host.System.WindowsNetworkPromptReaper.ExecuteAsync(), Tgstation.Server.Host.System.WindowsNetworkPromptReaper.RegisterProcess(), and Tgstation.Server.Host.System.WindowsNetworkPromptReaper.WindowsNetworkPromptReaper().

@@ -638,9 +638,9 @@ Here is the caller graph for this function:

Check for prompts each time this amount of milliseconds pass.

-

Definition at line 29 of file WindowsNetworkPromptReaper.cs.

+

Definition at line 28 of file WindowsNetworkPromptReaper.cs.

-

Referenced by Tgstation.Server.Host.System.WindowsNetworkPromptReaper.ExecuteAsync().

+

Referenced by Tgstation.Server.Host.System.WindowsNetworkPromptReaper.ExecuteAsync().

@@ -666,9 +666,9 @@ Here is the caller graph for this function:

The list of IProcesss registered.

-

Definition at line 44 of file WindowsNetworkPromptReaper.cs.

+

Definition at line 43 of file WindowsNetworkPromptReaper.cs.

-

Referenced by Tgstation.Server.Host.System.WindowsNetworkPromptReaper.ExecuteAsync(), Tgstation.Server.Host.System.WindowsNetworkPromptReaper.RegisterProcess(), and Tgstation.Server.Host.System.WindowsNetworkPromptReaper.WindowsNetworkPromptReaper().

+

Referenced by Tgstation.Server.Host.System.WindowsNetworkPromptReaper.ExecuteAsync(), Tgstation.Server.Host.System.WindowsNetworkPromptReaper.RegisterProcess(), and Tgstation.Server.Host.System.WindowsNetworkPromptReaper.WindowsNetworkPromptReaper().

@@ -694,9 +694,9 @@ Here is the caller graph for this function:

Number of times to send the button click message. Should be at least 2 or it may fail to focus the window.

-

Definition at line 24 of file WindowsNetworkPromptReaper.cs.

+

Definition at line 23 of file WindowsNetworkPromptReaper.cs.

-

Referenced by Tgstation.Server.Host.System.WindowsNetworkPromptReaper.ExecuteAsync().

+

Referenced by Tgstation.Server.Host.System.WindowsNetworkPromptReaper.ExecuteAsync().

diff --git a/class_tgstation_1_1_server_1_1_host_1_1_utils_1_1_async_delayer.html b/class_tgstation_1_1_server_1_1_host_1_1_utils_1_1_async_delayer.html index 6ec3f6b4b7..1c1061a0e5 100644 --- a/class_tgstation_1_1_server_1_1_host_1_1_utils_1_1_async_delayer.html +++ b/class_tgstation_1_1_server_1_1_host_1_1_utils_1_1_async_delayer.html @@ -238,7 +238,7 @@ Private Attributes

References Tgstation.Server.Host.Utils.AsyncDelayer.logger.

-

Referenced by Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.HandleNormalReboot(), Tgstation.Server.Host.Components.Chat.Providers.IrcProvider.HardDisconnect(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorRestart(), Tgstation.Server.Host.Components.Chat.Providers.Provider.ReconnectionLoop(), and Tgstation.Server.Host.Components.Chat.Providers.IrcProvider.SaslAuthenticate().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.HandleNormalReboot(), Tgstation.Server.Host.Components.Chat.Providers.IrcProvider.HardDisconnect(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorRestart(), Tgstation.Server.Host.Components.Chat.Providers.Provider.ReconnectionLoop(), and Tgstation.Server.Host.Components.Chat.Providers.IrcProvider.SaslAuthenticate().

Here is the caller graph for this function:
diff --git a/class_tgstation_1_1_server_1_1_host_1_1_utils_1_1_semaphore_slim_context.html b/class_tgstation_1_1_server_1_1_host_1_1_utils_1_1_semaphore_slim_context.html index 99a6b8780e..d326a2dd32 100644 --- a/class_tgstation_1_1_server_1_1_host_1_1_utils_1_1_semaphore_slim_context.html +++ b/class_tgstation_1_1_server_1_1_host_1_1_utils_1_1_semaphore_slim_context.html @@ -291,7 +291,7 @@ Private Attributes

References Tgstation.Server.Host.Utils.SemaphoreSlimContext.logger.

-

Referenced by Tgstation.Server.Host.Components.Chat.ChatManager.ChangeChannels(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ChangeSettings(), Tgstation.Server.Host.Components.Engine.EngineManager.ChangeVersion(), Tgstation.Server.Host.Components.Repository.RepositoryManager.CloneRepository(), Tgstation.Server.Host.IO.DefaultIOManager.CopyDirectoryImpl(), Tgstation.Server.Host.Components.StaticFiles.Configuration.CopyDMFilesTo(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.CreateDump(), Tgstation.Server.Host.Components.Chat.ChatManager.DeleteConnection(), Tgstation.Server.Host.Components.Repository.RepositoryManager.DeleteRepository(), Tgstation.Server.Host.Components.Engine.EngineManager.DeleteVersion(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAndNullControllers(), Tgstation.Server.Host.Components.StaticFiles.Configuration.ExecuteEventScripts(), Tgstation.Server.Host.GraphQL.Types.UpdateInformation.GetAdministrationResponseSafe(), Tgstation.Server.Host.Utils.PortAllocator.GetAvailablePort(), Tgstation.Server.Host.Utils.GitHub.GitHubClientFactory.GetOrCreateClient(), Tgstation.Server.Host.IO.BufferedFileStreamProvider.GetResultInternal(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleChatCommand(), Tgstation.Server.Host.Components.Engine.WindowsByondInstaller.InstallDirectX(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Launch(), Tgstation.Server.Host.Utils.FifoSemaphore.Lock(), Tgstation.Server.Host.Components.Deployment.HardLinkDmbProvider.MirrorDirectoryImpl(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorRestart(), Tgstation.Server.Host.Components.InstanceManager.MoveInstance(), Tgstation.Server.Host.Components.InstanceManager.OfflineInstance(), Tgstation.Server.Host.Components.InstanceManager.OnlineInstance(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ResetRebootState(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Restart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.StartAsync(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Terminate(), and Tgstation.Server.Host.Components.Engine.WindowsByondInstaller.TrustDmbPath().

+

Referenced by Tgstation.Server.Host.Components.Chat.ChatManager.ChangeChannels(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ChangeSettings(), Tgstation.Server.Host.Components.Engine.EngineManager.ChangeVersion(), Tgstation.Server.Host.Components.Repository.RepositoryManager.CloneRepository(), Tgstation.Server.Host.IO.DefaultIOManager.CopyDirectoryImpl(), Tgstation.Server.Host.Components.StaticFiles.Configuration.CopyDMFilesTo(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.CreateDump(), Tgstation.Server.Host.Components.Chat.ChatManager.DeleteConnection(), Tgstation.Server.Host.Components.Repository.RepositoryManager.DeleteRepository(), Tgstation.Server.Host.Components.Engine.EngineManager.DeleteVersion(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.DisposeAndNullControllers(), Tgstation.Server.Host.Components.StaticFiles.Configuration.ExecuteEventScripts(), Tgstation.Server.Host.GraphQL.Types.UpdateInformation.GetAdministrationResponseSafe(), Tgstation.Server.Host.Utils.PortAllocator.GetAvailablePort(), Tgstation.Server.Host.Utils.GitHub.GitHubClientFactory.GetOrCreateClient(), Tgstation.Server.Host.IO.BufferedFileStreamProvider.GetResultInternal(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleChatCommand(), Tgstation.Server.Host.Components.Engine.WindowsByondInstaller.InstallDirectX(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Launch(), Tgstation.Server.Host.Utils.FifoSemaphore.Lock(), Tgstation.Server.Host.Components.Deployment.HardLinkDmbProvider.MirrorDirectoryImpl(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorRestart(), Tgstation.Server.Host.Components.InstanceManager.MoveInstance(), Tgstation.Server.Host.Components.InstanceManager.OfflineInstance(), Tgstation.Server.Host.Components.InstanceManager.OnlineInstance(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ResetRebootState(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Restart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.StartAsync(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Terminate(), and Tgstation.Server.Host.Components.Engine.WindowsByondInstaller.TrustDmbPath().

Here is the caller graph for this function:
diff --git a/class_tgstation_1_1_server_1_1_host_1_1_utils_1_1_serilog_context_helper.html b/class_tgstation_1_1_server_1_1_host_1_1_utils_1_1_serilog_context_helper.html index a1c67029dd..be18a8945d 100644 --- a/class_tgstation_1_1_server_1_1_host_1_1_utils_1_1_serilog_context_helper.html +++ b/class_tgstation_1_1_server_1_1_host_1_1_utils_1_1_serilog_context_helper.html @@ -505,7 +505,7 @@ Static Private Attributes

Definition at line 31 of file SerilogContextHelper.cs.

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes().

diff --git a/interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_chat_1_1_i_chat_manager.html b/interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_chat_1_1_i_chat_manager.html index 4d715c0750..a31b74321e 100644 --- a/interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_chat_1_1_i_chat_manager.html +++ b/interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_chat_1_1_i_chat_manager.html @@ -440,7 +440,7 @@ Here is the caller graph for this function:

Implemented in Tgstation.Server.Host.Components.Chat.ChatManager.

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleChatResponses(), and Tgstation.Server.Host.Components.Session.SessionController.ProcessBridgeCommand().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleChatResponses(), and Tgstation.Server.Host.Components.Session.SessionController.ProcessBridgeCommand().

Here is the caller graph for this function:
@@ -489,7 +489,7 @@ Here is the caller graph for this function:

Implemented in Tgstation.Server.Host.Components.Chat.ChatManager.

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleHealthCheck(), Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.HandleMonitorWakeup(), Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.HandleNewDmbAvailable(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.HandleNormalReboot(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleRestart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorRestart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ReattachFailure(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Restart(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.TerminateNoLock().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleHealthCheck(), Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.HandleMonitorWakeup(), Tgstation.Server.Host.Components.Watchdog.BasicWatchdog.HandleNewDmbAvailable(), Tgstation.Server.Host.Components.Watchdog.AdvancedWatchdog.HandleNormalReboot(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleRestart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.LaunchNoLock(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorLifetimes(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.MonitorRestart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ReattachFailure(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.Restart(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.TerminateNoLock().

Here is the caller graph for this function:
@@ -565,7 +565,7 @@ Here is the caller graph for this function:

Implemented in Tgstation.Server.Host.Components.Chat.ChatManager.

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

Here is the caller graph for this function:
@@ -606,7 +606,7 @@ Here is the caller graph for this function:

Implemented in Tgstation.Server.Host.Components.Chat.ChatManager.

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.StartAsync().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.StartAsync().

Here is the caller graph for this function:
diff --git a/interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_deployment_1_1_remote_1_1_i_remote_deployment_manager_factory.html b/interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_deployment_1_1_remote_1_1_i_remote_deployment_manager_factory.html index 45efafb99c..f8a41338ce 100644 --- a/interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_deployment_1_1_remote_1_1_i_remote_deployment_manager_factory.html +++ b/interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_deployment_1_1_remote_1_1_i_remote_deployment_manager_factory.html @@ -189,7 +189,7 @@ Public Member Functions

Implemented in Tgstation.Server.Host.Components.Deployment.Remote.RemoteDeploymentManagerFactory.

-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.BeforeApplyDmb(), Tgstation.Server.Host.Components.Deployment.DmbFactory.CleanRegisteredCompileJob(), Tgstation.Server.Host.Components.Deployment.DreamMaker.DeploymentProcess(), Tgstation.Server.Host.Components.Deployment.DmbFactory.LoadCompileJob(), and Tgstation.Server.Host.Components.Instance.RepositoryAutoUpdateJob().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.BeforeApplyDmb(), Tgstation.Server.Host.Components.Deployment.DmbFactory.CleanRegisteredCompileJob(), Tgstation.Server.Host.Components.Deployment.DreamMaker.DeploymentProcess(), Tgstation.Server.Host.Components.Deployment.DmbFactory.LoadCompileJob(), and Tgstation.Server.Host.Components.Instance.RepositoryAutoUpdateJob().

Here is the caller graph for this function:
diff --git a/interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_events_1_1_i_event_consumer.html b/interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_events_1_1_i_event_consumer.html index dd34a6b852..d957759a18 100644 --- a/interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_events_1_1_i_event_consumer.html +++ b/interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_events_1_1_i_event_consumer.html @@ -242,7 +242,7 @@ Here is the caller graph for this function:

Implemented in Tgstation.Server.Host.Components.Events.EventConsumer, Tgstation.Server.Host.Components.Events.NoopEventConsumer, Tgstation.Server.Host.Components.StaticFiles.Configuration, and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.

-

Referenced by Tgstation.Server.Host.Components.Repository.Repository.AddTestMerge(), Tgstation.Server.Host.Components.Engine.EngineManager.AssertAndLockVersion(), Tgstation.Server.Host.Components.Instance.AutoUpdateAction(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.BeforeApplyDmb(), Tgstation.Server.Host.Components.Engine.EngineManager.ChangeVersion(), Tgstation.Server.Host.Components.Repository.Repository.CheckoutObject(), Tgstation.Server.Host.Components.Deployment.DreamMaker.Compile(), Tgstation.Server.Host.Components.Session.SessionControllerFactory.CreateGameServerProcess(), Tgstation.Server.Host.Components.Deployment.DmbFactory.DeleteCompileJobContent(), Tgstation.Server.Host.Components.Deployment.DreamMaker.DeploymentProcess(), Tgstation.Server.Host.Components.Repository.Repository.FetchOrigin(), Tgstation.Server.Host.Components.Events.EventConsumer.HandleEvent(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleEventImpl(), Tgstation.Server.Host.Components.Repository.Repository.MergeOrigin(), Tgstation.Server.Host.Components.Repository.Repository.ResetToOrigin(), and Tgstation.Server.Host.Components.Deployment.DreamMaker.RunCompileJob().

+

Referenced by Tgstation.Server.Host.Components.Repository.Repository.AddTestMerge(), Tgstation.Server.Host.Components.Engine.EngineManager.AssertAndLockVersion(), Tgstation.Server.Host.Components.Instance.AutoUpdateAction(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.BeforeApplyDmb(), Tgstation.Server.Host.Components.Engine.EngineManager.ChangeVersion(), Tgstation.Server.Host.Components.Repository.Repository.CheckoutObject(), Tgstation.Server.Host.Components.Deployment.DreamMaker.Compile(), Tgstation.Server.Host.Components.Session.SessionControllerFactory.CreateGameServerProcess(), Tgstation.Server.Host.Components.Deployment.DmbFactory.DeleteCompileJobContent(), Tgstation.Server.Host.Components.Deployment.DreamMaker.DeploymentProcess(), Tgstation.Server.Host.Components.Repository.Repository.FetchOrigin(), Tgstation.Server.Host.Components.Events.EventConsumer.HandleEvent(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.HandleEventImpl(), Tgstation.Server.Host.Components.Repository.Repository.MergeOrigin(), Tgstation.Server.Host.Components.Repository.Repository.ResetToOrigin(), and Tgstation.Server.Host.Components.Deployment.DreamMaker.RunCompileJob().

Here is the caller graph for this function:
diff --git a/interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_i_session_controller.html b/interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_i_session_controller.html index b0fe0b889f..a9bec4af0a 100644 --- a/interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_i_session_controller.html +++ b/interface_tgstation_1_1_server_1_1_host_1_1_components_1_1_session_1_1_i_session_controller.html @@ -538,7 +538,7 @@ Properties

Definition at line 45 of file ISessionController.cs.

45{ get; }
-

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ChangeSettings().

+

Referenced by Tgstation.Server.Host.Components.Watchdog.WatchdogBase.ChangeSettings().

diff --git a/interface_tgstation_1_1_server_1_1_host_1_1_core_1_1_i_server_control.html b/interface_tgstation_1_1_server_1_1_host_1_1_core_1_1_i_server_control.html index d369843245..5a59dbd5e2 100644 --- a/interface_tgstation_1_1_server_1_1_host_1_1_core_1_1_i_server_control.html +++ b/interface_tgstation_1_1_server_1_1_host_1_1_core_1_1_i_server_control.html @@ -244,7 +244,7 @@ Here is the caller graph for this function:

Implemented in Tgstation.Server.Host.Server.

-

Referenced by Tgstation.Server.Host.Components.Chat.ChatManager.ChatManager(), Tgstation.Server.Host.System.SystemDManager.SystemDManager(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

+

Referenced by Tgstation.Server.Host.Components.Chat.ChatManager.ChatManager(), Tgstation.Server.Host.System.SystemDManager.SystemDManager(), and Tgstation.Server.Host.Components.Watchdog.WatchdogBase.WatchdogBase().

Here is the caller graph for this function:
diff --git a/interface_tgstation_1_1_server_1_1_host_1_1_jobs_1_1_i_job_manager.html b/interface_tgstation_1_1_server_1_1_host_1_1_jobs_1_1_i_job_manager.html index 28555631bc..6cd6eab550 100644 --- a/interface_tgstation_1_1_server_1_1_host_1_1_jobs_1_1_i_job_manager.html +++ b/interface_tgstation_1_1_server_1_1_host_1_1_jobs_1_1_i_job_manager.html @@ -231,7 +231,7 @@ Here is the caller graph for this function:

Implemented in Tgstation.Server.Host.Jobs.JobService.

-

Referenced by Tgstation.Server.Host.Components.Instance.AutoUpdateAction(), Tgstation.Server.Host.Controllers.RepositoryController.Create(), Tgstation.Server.Host.Controllers.DreamDaemonController.Create(), Tgstation.Server.Host.Controllers.DreamMakerController.Create(), Tgstation.Server.Host.Controllers.DreamDaemonController.CreateDump(), Tgstation.Server.Host.Controllers.EngineController.Delete(), Tgstation.Server.Host.Controllers.RepositoryController.Delete(), Tgstation.Server.Host.Controllers.RepositoryController.Reclone(), Tgstation.Server.Host.Components.Chat.Providers.Provider.ReconnectionLoop(), Tgstation.Server.Host.Controllers.DreamDaemonController.Restart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.StartAsync(), Tgstation.Server.Host.Controllers.EngineController.Update(), Tgstation.Server.Host.Controllers.InstanceController.Update(), and Tgstation.Server.Host.Controllers.RepositoryController.Update().

+

Referenced by Tgstation.Server.Host.Components.Instance.AutoUpdateAction(), Tgstation.Server.Host.Controllers.RepositoryController.Create(), Tgstation.Server.Host.Controllers.DreamDaemonController.Create(), Tgstation.Server.Host.Controllers.DreamMakerController.Create(), Tgstation.Server.Host.Controllers.DreamDaemonController.CreateDump(), Tgstation.Server.Host.Controllers.EngineController.Delete(), Tgstation.Server.Host.Controllers.RepositoryController.Delete(), Tgstation.Server.Host.Controllers.RepositoryController.Reclone(), Tgstation.Server.Host.Components.Chat.Providers.Provider.ReconnectionLoop(), Tgstation.Server.Host.Controllers.DreamDaemonController.Restart(), Tgstation.Server.Host.Components.Watchdog.WatchdogBase.StartAsync(), Tgstation.Server.Host.Controllers.EngineController.Update(), Tgstation.Server.Host.Controllers.InstanceController.Update(), and Tgstation.Server.Host.Controllers.RepositoryController.Update().

Here is the caller graph for this function:
diff --git a/interface_tgstation_1_1_server_1_1_host_1_1_system_1_1_i_process.html b/interface_tgstation_1_1_server_1_1_host_1_1_system_1_1_i_process.html index 151d2e7e38..36c65d1f60 100644 --- a/interface_tgstation_1_1_server_1_1_host_1_1_system_1_1_i_process.html +++ b/interface_tgstation_1_1_server_1_1_host_1_1_system_1_1_i_process.html @@ -318,7 +318,7 @@ Here is the caller graph for this function:

Definition at line 15 of file IProcess.cs.

15{ get; }
-

Referenced by Tgstation.Server.Host.System.DotnetDumpService.Dump(), and Tgstation.Server.Host.System.WindowsNetworkPromptReaper.RegisterProcess().

+

Referenced by Tgstation.Server.Host.System.DotnetDumpService.Dump(), and Tgstation.Server.Host.System.WindowsNetworkPromptReaper.RegisterProcess().

diff --git a/interface_tgstation_1_1_server_1_1_host_1_1_system_1_1_i_process_base.html b/interface_tgstation_1_1_server_1_1_host_1_1_system_1_1_i_process_base.html index 06139497ff..cdffa05db1 100644 --- a/interface_tgstation_1_1_server_1_1_host_1_1_system_1_1_i_process_base.html +++ b/interface_tgstation_1_1_server_1_1_host_1_1_system_1_1_i_process_base.html @@ -319,7 +319,7 @@ Here is the caller graph for this function:

Definition at line 20 of file IProcessBase.cs.

20{ get; }
-

Referenced by Tgstation.Server.Host.Components.Session.SessionController.GetLaunchResult(), Tgstation.Server.Host.Components.Session.SessionController.PostValidationShutdown(), Tgstation.Server.Host.System.WindowsNetworkPromptReaper.RegisterProcess(), Tgstation.Server.Host.Components.Session.SessionController.SessionController(), Tgstation.Server.Host.Components.Engine.EngineInstallationBase.StopServerProcess(), and Tgstation.Server.Host.Components.Engine.OpenDreamInstallation.StopServerProcess().

+

Referenced by Tgstation.Server.Host.Components.Session.SessionController.GetLaunchResult(), Tgstation.Server.Host.Components.Session.SessionController.PostValidationShutdown(), Tgstation.Server.Host.System.WindowsNetworkPromptReaper.RegisterProcess(), Tgstation.Server.Host.Components.Session.SessionController.SessionController(), Tgstation.Server.Host.Components.Engine.EngineInstallationBase.StopServerProcess(), and Tgstation.Server.Host.Components.Engine.OpenDreamInstallation.StopServerProcess().

diff --git a/interface_tgstation_1_1_server_1_1_host_1_1_utils_1_1_i_async_delayer.html b/interface_tgstation_1_1_server_1_1_host_1_1_utils_1_1_i_async_delayer.html index 94adcce1bc..1a7e930b72 100644 --- a/interface_tgstation_1_1_server_1_1_host_1_1_utils_1_1_i_async_delayer.html +++ b/interface_tgstation_1_1_server_1_1_host_1_1_utils_1_1_i_async_delayer.html @@ -143,7 +143,7 @@ Public Member Functions

Implemented in Tgstation.Server.Host.Utils.AsyncDelayer.

-

Referenced by Tgstation.Server.Host.Swarm.SwarmService.CommitUpdate(), Tgstation.Server.Host.System.WindowsNetworkPromptReaper.ExecuteAsync(), Tgstation.Server.Host.Core.VersionReportingService.ExecuteAsync(), Tgstation.Server.Host.Components.Session.SessionController.GetLaunchResult(), Tgstation.Server.Host.Security.IdentityCacheObject.IdentityCacheObject(), Tgstation.Server.Host.Components.InstanceManager.InitializeSwarm(), Tgstation.Server.Host.Components.Deployment.DmbFactory.LogLockStates(), Tgstation.Server.Host.Components.Session.SessionControllerFactory.PortBindTest(), Tgstation.Server.Host.Components.Session.SessionController.PostValidationShutdown(), Tgstation.Server.Host.Components.InstanceManager.ProcessBridgeRequest(), Tgstation.Server.Host.Transfer.FileTransferService.QueueExpiry(), Tgstation.Server.Host.Extensions.TopicClientExtensions.SendWithOptionalPriority(), Tgstation.Server.Host.System.PosixSignalHandler.SignalChecker(), and Tgstation.Server.Host.Components.Instance.TimerLoop().

+

Referenced by Tgstation.Server.Host.Swarm.SwarmService.CommitUpdate(), Tgstation.Server.Host.System.WindowsNetworkPromptReaper.ExecuteAsync(), Tgstation.Server.Host.Core.VersionReportingService.ExecuteAsync(), Tgstation.Server.Host.Components.Session.SessionController.GetLaunchResult(), Tgstation.Server.Host.Security.IdentityCacheObject.IdentityCacheObject(), Tgstation.Server.Host.Components.InstanceManager.InitializeSwarm(), Tgstation.Server.Host.Components.Deployment.DmbFactory.LogLockStates(), Tgstation.Server.Host.Components.Session.SessionControllerFactory.PortBindTest(), Tgstation.Server.Host.Components.Session.SessionController.PostValidationShutdown(), Tgstation.Server.Host.Components.InstanceManager.ProcessBridgeRequest(), Tgstation.Server.Host.Transfer.FileTransferService.QueueExpiry(), Tgstation.Server.Host.Extensions.TopicClientExtensions.SendWithOptionalPriority(), Tgstation.Server.Host.System.PosixSignalHandler.SignalChecker(), and Tgstation.Server.Host.Components.Instance.TimerLoop().

Here is the caller graph for this function: