Make the temp folder a setting

This commit is contained in:
Timothy Baldridge 2020-01-01 15:38:21 -07:00
parent 55f90bd485
commit c45bd2928b
5 changed files with 20 additions and 1 deletions

View File

@ -248,7 +248,7 @@ namespace Wabbajack.CacheServer
using (var queue = new WorkQueue())
{
await Directory.EnumerateFiles(Path.Combine("c:\\tmp", (string)arg.Folder)).PMap(queue,
await Directory.EnumerateFiles(Path.Combine(Server.Config.Settings.TempDir, (string)arg.Folder)).PMap(queue,
async file =>
{
Utils.Log($"Ingesting {file}");

View File

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MongoDB.Driver.Core.Configuration;
using Wabbajack.CacheServer.DTOs;
using Wabbajack.CacheServer.DTOs.JobQueue;
using Wabbajack.Lib.NexusApi;
@ -24,5 +25,7 @@ namespace Wabbajack.CacheServer.ServerConfig
public MongoConfig<NexusCacheData<NexusFileInfo>> NexusFileInfos { get; set; }
public IndexerConfig Indexer { get; set; }
public Settings Settings { get; set; }
}
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Wabbajack.CacheServer.ServerConfig
{
public class Settings
{
public string TempDir { get; set; }
}
}

View File

@ -96,6 +96,7 @@
<Compile Include="ServerConfig\BuildServerConfig.cs" />
<Compile Include="ServerConfig\IndexerConfig.cs" />
<Compile Include="ServerConfig\MongoConfig.cs" />
<Compile Include="ServerConfig\Settings.cs" />
<Compile Include="TestingEndpoints.cs" />
</ItemGroup>
<ItemGroup>

View File

@ -35,3 +35,5 @@ Indexer:
DownloadDir: c:\tmp\downloads
TempDir: c:\tmp\tmp
ArchiveDir: c:\archives
Settings:
TempDir: c:\tmp\tmp