mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-27 07:04:57 +01:00
Cleanup IDE warnings
This commit is contained in:
@@ -717,7 +717,7 @@ namespace Tgstation.Server.Host.Components.Deployment
|
||||
/// <returns>A <see cref="Task"/> representing the running operation.</returns>
|
||||
async Task ProgressTask(JobProgressReporter progressReporter, TimeSpan? estimatedDuration, CancellationToken cancellationToken)
|
||||
{
|
||||
progressReporter(currentStage, estimatedDuration.HasValue ? (int?)0 : null);
|
||||
progressReporter(currentStage, estimatedDuration.HasValue ? 0 : null);
|
||||
var sleepInterval = estimatedDuration.HasValue ? estimatedDuration.Value / 100 : TimeSpan.FromMilliseconds(250);
|
||||
|
||||
logger.LogDebug("Compile is expected to take: {0}", estimatedDuration);
|
||||
@@ -726,7 +726,7 @@ namespace Tgstation.Server.Host.Components.Deployment
|
||||
for (var iteration = 0; iteration < (estimatedDuration.HasValue ? 99 : Int32.MaxValue); ++iteration)
|
||||
{
|
||||
await Task.Delay(sleepInterval, cancellationToken);
|
||||
progressReporter(currentStage, estimatedDuration.HasValue ? (int?)(iteration + 1) : null);
|
||||
progressReporter(currentStage, estimatedDuration.HasValue ? iteration + 1 : null);
|
||||
}
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@ namespace Tgstation.Server.Host.Components.Deployment.Remote
|
||||
{
|
||||
await Task.WhenAll(tasks);
|
||||
}
|
||||
catch (Exception ex) when (!(ex is OperationCanceledException))
|
||||
catch (Exception ex) when (ex is not OperationCanceledException)
|
||||
{
|
||||
Logger.LogWarning(ex, "Merge requests update check failed!");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user