mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Add some missing using
calls for jobs
This commit is contained in:
parent
843d115b9d
commit
e102567bf5
@ -281,7 +281,7 @@ public class DownloadDispatcher
|
|||||||
var downloader = Downloader(archive);
|
var downloader = Downloader(archive);
|
||||||
if (downloader is not IUpgradingDownloader ud) return null;
|
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);
|
token);
|
||||||
return await ud.TryGetUpgrade(archive, job, fileManager, token);
|
return await ud.TryGetUpgrade(archive, job, fileManager, token);
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,7 @@ public class ModListDownloadMaintainer
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
Interlocked.Increment(ref _downloadingCount);
|
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);
|
token.Value);
|
||||||
|
|
||||||
job.OnUpdate += (_, pr) => { progress.OnNext(pr.Progress); };
|
job.OnUpdate += (_, pr) => { progress.OnNext(pr.Progress); };
|
||||||
|
Loading…
Reference in New Issue
Block a user