User connection updates should bypass the jobs hub message rate limiter

This commit is contained in:
Jordan Dominion
2023-11-05 12:12:15 -05:00
parent b79d02c77a
commit 337eb15a7f
+4 -4
View File
@@ -341,7 +341,7 @@ namespace Tgstation.Server.Host.Jobs
Stopwatch stopwatch = null;
void QueueHubUpdate(JobResponse update, bool final)
{
void NextUpdate()
void NextUpdate(bool bypassRate)
{
var currentUpdatesTask = hubUpdatesTask;
async Task ChainHubUpdate()
@@ -358,7 +358,7 @@ namespace Tgstation.Server.Host.Jobs
Stopwatch enteredLock = null;
try
{
if (stopwatch != null)
if (!bypassRate && stopwatch != null)
{
Monitor.Enter(stopwatch);
enteredLock = stopwatch;
@@ -381,9 +381,9 @@ namespace Tgstation.Server.Host.Jobs
if (final)
hubUpdateActions.Remove(jobId);
else
hubUpdateActions[jobId] = NextUpdate;
hubUpdateActions[jobId] = () => NextUpdate(true);
NextUpdate();
NextUpdate(false);
}
try