mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
WorkQueue.Messages removed (for now)
This commit is contained in:
parent
b1ebd3c362
commit
a0214d4cbe
@ -48,12 +48,11 @@ namespace Wabbajack.Common
|
||||
else if (source.EndsWith(".exe"))
|
||||
ExtractAllWithInno(source, dest);
|
||||
else
|
||||
ExtractAllWith7Zip(queue, source, dest);
|
||||
ExtractAllWith7Zip(source, dest);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
queue.Log($"Error while extracting {source}");
|
||||
throw ex;
|
||||
Utils.ErrorThrow(ex, $"Error while extracting {source}");
|
||||
}
|
||||
}
|
||||
|
||||
@ -154,14 +153,13 @@ namespace Wabbajack.Common
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
queue.Log($"While Extracting {source}");
|
||||
throw ex;
|
||||
Utils.ErrorThrow(ex, $"While Extracting {source}");
|
||||
}
|
||||
}
|
||||
|
||||
private static void ExtractAllWith7Zip(WorkQueue queue, string source, string dest)
|
||||
private static void ExtractAllWith7Zip(string source, string dest)
|
||||
{
|
||||
queue.Log(new GenericInfo($"Extracting {Path.GetFileName(source)}", $"The contents of {source} are being extracted to {dest} using 7zip.exe"));
|
||||
Utils.Log(new GenericInfo($"Extracting {Path.GetFileName(source)}", $"The contents of {source} are being extracted to {dest} using 7zip.exe"));
|
||||
|
||||
var info = new ProcessStartInfo
|
||||
{
|
||||
@ -210,7 +208,7 @@ namespace Wabbajack.Common
|
||||
{
|
||||
return;
|
||||
}
|
||||
queue.Log(new _7zipReturnError(p.ExitCode, source, dest, p.StandardOutput.ReadToEnd()));
|
||||
Utils.Log(new _7zipReturnError(p.ExitCode, source, dest, p.StandardOutput.ReadToEnd()));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -22,9 +22,6 @@ namespace Wabbajack.Common
|
||||
private readonly Subject<CPUStatus> _Status = new Subject<CPUStatus>();
|
||||
public IObservable<CPUStatus> Status => _Status;
|
||||
|
||||
private static readonly Subject<IStatusMessage> _messages = new Subject<IStatusMessage>();
|
||||
public IObservable<IStatusMessage> Messages => _messages;
|
||||
|
||||
public static List<Thread> Threads { get; private set; }
|
||||
|
||||
public WorkQueue(int threadCount = 0)
|
||||
@ -32,16 +29,6 @@ namespace Wabbajack.Common
|
||||
StartThreads(threadCount == 0 ? Environment.ProcessorCount : threadCount);
|
||||
}
|
||||
|
||||
public void Log(IStatusMessage msg)
|
||||
{
|
||||
_messages.OnNext(msg);
|
||||
}
|
||||
|
||||
public void Log(string msg)
|
||||
{
|
||||
_messages.OnNext(new GenericInfo(msg));
|
||||
}
|
||||
|
||||
private void StartThreads(int threadCount)
|
||||
{
|
||||
ThreadCount = threadCount;
|
||||
|
Loading…
x
Reference in New Issue
Block a user