mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-27 07:04:57 +01:00
Merge pull request #1415 from tgstation/1413-FixRateLimitWatchdogHitch [TGSDeploy]
Fix GitHub rate limits stopping watchdog from launching
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@
|
||||
<!-- Integration tests will ensure they match across the board -->
|
||||
<Import Project="ControlPanelVersion.props" />
|
||||
<PropertyGroup>
|
||||
<TgsCoreVersion>5.2.2</TgsCoreVersion>
|
||||
<TgsCoreVersion>5.2.3</TgsCoreVersion>
|
||||
<TgsConfigVersion>4.4.0</TgsConfigVersion>
|
||||
<TgsApiVersion>9.7.0</TgsApiVersion>
|
||||
<TgsApiLibraryVersion>10.1.0</TgsApiLibraryVersion>
|
||||
|
||||
@@ -661,18 +661,26 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
/// <param name="newCompileJob">The new <see cref="Models.CompileJob"/> being applied.</param>
|
||||
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the operation.</param>
|
||||
/// <returns>A <see cref="Task"/> representing the running operation.</returns>
|
||||
protected Task BeforeApplyDmb(Models.CompileJob newCompileJob, CancellationToken cancellationToken)
|
||||
protected async Task BeforeApplyDmb(Models.CompileJob newCompileJob, CancellationToken cancellationToken)
|
||||
{
|
||||
if (newCompileJob.Id == ActiveCompileJob?.Id)
|
||||
{
|
||||
Logger.LogTrace("Same compile job, not sending deployment event");
|
||||
return Task.CompletedTask;
|
||||
return;
|
||||
}
|
||||
|
||||
var remoteDeploymentManager = remoteDeploymentManagerFactory.CreateRemoteDeploymentManager(
|
||||
metadata,
|
||||
newCompileJob);
|
||||
return remoteDeploymentManager.ApplyDeployment(newCompileJob, ActiveCompileJob, cancellationToken);
|
||||
|
||||
try
|
||||
{
|
||||
await remoteDeploymentManager.ApplyDeployment(newCompileJob, ActiveCompileJob, cancellationToken);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.LogWarning(ex, "Failed to apply remote deployment!");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -110,8 +110,7 @@ namespace Tgstation.Server.Host.Controllers
|
||||
var totalUsers = await DatabaseContext
|
||||
.Users
|
||||
.AsQueryable()
|
||||
.CountAsync(cancellationToken)
|
||||
;
|
||||
.CountAsync(cancellationToken);
|
||||
if (totalUsers >= generalConfiguration.UserLimit)
|
||||
return Conflict(new ErrorMessageResponse(ErrorCode.UserLimitReached));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user