Add some missing using calls for jobs

This commit is contained in:
Timothy Baldridge 2022-07-25 22:39:00 -06:00
parent 843d115b9d
commit e102567bf5
2 changed files with 2 additions and 2 deletions

View File

@ -281,7 +281,7 @@ public class DownloadDispatcher
var downloader = Downloader(archive);
if (downloader is not IUpgradingDownloader ud) return null;
var job = await _limiter.Begin($"Finding upgrade for {archive.Name} - {archive.State.PrimaryKeyString}", 0,
using var job = await _limiter.Begin($"Finding upgrade for {archive.Name} - {archive.State.PrimaryKeyString}", 0,
token);
return await ud.TryGetUpgrade(archive, job, fileManager, token);
}

View File

@ -68,7 +68,7 @@ public class ModListDownloadMaintainer
try
{
Interlocked.Increment(ref _downloadingCount);
var job = await _rateLimiter.Begin($"Downloading {metadata.Title}", metadata.DownloadMetadata!.Size,
using var job = await _rateLimiter.Begin($"Downloading {metadata.Title}", metadata.DownloadMetadata!.Size,
token.Value);
job.OnUpdate += (_, pr) => { progress.OnNext(pr.Progress); };