Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
tgstation-server committed Jun 3, 2023
2 parents 39df4a3 + 30531ed commit f265b4f
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
4 changes: 1 addition & 3 deletions src/Tgstation.Server.Host/Components/Chat/ChatManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,6 @@ ICommand GetCommand(string commandName)
catch (OperationCanceledException ex)
{
logger.LogTrace(ex, "Command processing canceled!");
throw;
}
catch (Exception e)
{
Expand All @@ -900,8 +899,7 @@ ICommand GetCommand(string commandName)
{
Text = "TGS: Internal error processing command! Check server logs!",
},
cancellationToken)
;
cancellationToken);
}
finally
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,8 @@ await using (process)

try
{
networkPromptReaper.RegisterProcess(process);
if (!byondLock.SupportsCli)
networkPromptReaper.RegisterProcess(process);

var chatTrackingContext = chat.CreateTrackingContext();
try
Expand Down Expand Up @@ -531,15 +532,16 @@ await using (process)
else if (sessionConfiguration.LowPriorityDeploymentProcesses)
process.AdjustPriority(false);

networkPromptReaper.RegisterProcess(process);
if (!byondLock.SupportsCli)
networkPromptReaper.RegisterProcess(process);

// If this isnt a staging DD (From a Deployment), fire off an event
if (!apiValidate)
await eventConsumer.HandleEvent(
EventType.DreamDaemonLaunch,
new List<string>
{
process.Id.ToString(CultureInfo.InvariantCulture),
process.Id.ToString(CultureInfo.InvariantCulture),
},
cancellationToken);

Expand Down
14 changes: 13 additions & 1 deletion src/Tgstation.Server.Host/Swarm/SwarmService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@ public bool ExpectedNumberOfNodesConnected
/// </summary>
bool serversDirty;

/// <summary>
/// If we've sent out a remote commit message for an update operation.
/// </summary>
bool updateCommitSent;

/// <summary>
/// Initializes static members of the <see cref="SwarmService"/> class.
/// </summary>
Expand Down Expand Up @@ -425,6 +430,8 @@ async Task SendRemoteCommitUpdate(SwarmServerResponse swarmServer)
}
}

updateCommitSent = true;

Task task;
lock (swarmServers)
task = Task.WhenAll(
Expand Down Expand Up @@ -725,7 +732,12 @@ public async Task UnregisterNode(Guid registrationId, CancellationToken cancella
return;

logger.LogInformation("Unregistering node {nodeId}...", nodeIdentifier);
await AbortUpdate(cancellationToken);

if (!updateCommitSent)
await AbortUpdate(cancellationToken);
else
logger.LogTrace("Not aborting update because we have committed");

lock (swarmServers)
{
swarmServers.RemoveAll(x => x.Identifier == nodeIdentifier);
Expand Down
4 changes: 4 additions & 0 deletions src/Tgstation.Server.Host/Tgstation.Server.Host.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
<DockerfileContext>..\..</DockerfileContext>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>$(DefineConstants);WATCHDOG_FREE_RESTART</DefineConstants>
</PropertyGroup>

<Target Name="ClientInstall" BeforeTargets="ResolveAssemblyReferences" Inputs="../../build/ControlPanelVersion.props" Outputs="$(NpmInstallStampFile)">
<Message Text="Pulling web control panel..." Importance="high" />
<RemoveDir Directories="ClientApp" />
Expand Down

0 comments on commit f265b4f

Please sign in to comment.