From 7ec06871c3710ed0dbd2b20b0e67a0b072275b89 Mon Sep 17 00:00:00 2001 From: Cyberboss Date: Sat, 18 Jan 2020 22:09:46 -0500 Subject: [PATCH] Adds new Jobs namespace --- src/Tgstation.Server.Host/Components/Byond/ByondManager.cs | 1 + .../Components/Byond/WindowsByondInstaller.cs | 1 + src/Tgstation.Server.Host/Components/Deployment/DreamMaker.cs | 2 +- src/Tgstation.Server.Host/Components/IInstance.cs | 2 +- src/Tgstation.Server.Host/Components/Instance.cs | 1 + src/Tgstation.Server.Host/Components/InstanceFactory.cs | 1 + src/Tgstation.Server.Host/Components/InstanceManager.cs | 1 + .../Components/Repository/CredentialsProvider.cs | 2 +- src/Tgstation.Server.Host/Components/Repository/Repository.cs | 2 +- src/Tgstation.Server.Host/Components/Watchdog/BasicWatchdog.cs | 1 + .../Components/Watchdog/ExperimentalWatchdog.cs | 1 + src/Tgstation.Server.Host/Components/Watchdog/WatchdogBase.cs | 1 + .../Components/Watchdog/WatchdogFactory.cs | 1 + .../Components/Watchdog/WindowsWatchdog.cs | 1 + .../Components/Watchdog/WindowsWatchdogFactory.cs | 1 + src/Tgstation.Server.Host/Controllers/ByondController.cs | 2 +- src/Tgstation.Server.Host/Controllers/DreamDaemonController.cs | 2 +- src/Tgstation.Server.Host/Controllers/DreamMakerController.cs | 2 +- src/Tgstation.Server.Host/Controllers/InstanceController.cs | 1 + src/Tgstation.Server.Host/Controllers/JobController.cs | 2 +- src/Tgstation.Server.Host/Controllers/RepositoryController.cs | 1 + src/Tgstation.Server.Host/Core/Application.cs | 1 + src/Tgstation.Server.Host/{Core => Jobs}/IJobManager.cs | 2 +- src/Tgstation.Server.Host/{Core => Jobs}/JobException.cs | 2 +- src/Tgstation.Server.Host/{Core => Jobs}/JobHandler.cs | 2 +- src/Tgstation.Server.Host/{Core => Jobs}/JobManager.cs | 2 +- .../Components/Watchdog/TestExperimentalWatchdog.cs | 1 + .../{Core => Jobs}/TestJobException.cs | 2 +- .../{Core => Jobs}/TestJobHandler.cs | 2 +- 29 files changed, 29 insertions(+), 14 deletions(-) rename src/Tgstation.Server.Host/{Core => Jobs}/IJobManager.cs (98%) rename src/Tgstation.Server.Host/{Core => Jobs}/JobException.cs (96%) rename src/Tgstation.Server.Host/{Core => Jobs}/JobHandler.cs (98%) rename src/Tgstation.Server.Host/{Core => Jobs}/JobManager.cs (99%) rename tests/Tgstation.Server.Host.Tests/{Core => Jobs}/TestJobException.cs (87%) rename tests/Tgstation.Server.Host.Tests/{Core => Jobs}/TestJobHandler.cs (97%) diff --git a/src/Tgstation.Server.Host/Components/Byond/ByondManager.cs b/src/Tgstation.Server.Host/Components/Byond/ByondManager.cs index 73c458f7f0..a4262f12ee 100644 --- a/src/Tgstation.Server.Host/Components/Byond/ByondManager.cs +++ b/src/Tgstation.Server.Host/Components/Byond/ByondManager.cs @@ -9,6 +9,7 @@ using System.Threading; using System.Threading.Tasks; using Tgstation.Server.Host.Core; using Tgstation.Server.Host.IO; +using Tgstation.Server.Host.Jobs; namespace Tgstation.Server.Host.Components.Byond { diff --git a/src/Tgstation.Server.Host/Components/Byond/WindowsByondInstaller.cs b/src/Tgstation.Server.Host/Components/Byond/WindowsByondInstaller.cs index 43a3f9e3b4..c743a08b60 100644 --- a/src/Tgstation.Server.Host/Components/Byond/WindowsByondInstaller.cs +++ b/src/Tgstation.Server.Host/Components/Byond/WindowsByondInstaller.cs @@ -6,6 +6,7 @@ using System.Threading; using System.Threading.Tasks; using Tgstation.Server.Host.Core; using Tgstation.Server.Host.IO; +using Tgstation.Server.Host.Jobs; using Tgstation.Server.Host.System; namespace Tgstation.Server.Host.Components.Byond diff --git a/src/Tgstation.Server.Host/Components/Deployment/DreamMaker.cs b/src/Tgstation.Server.Host/Components/Deployment/DreamMaker.cs index 8a0c75f35b..e93de15c20 100644 --- a/src/Tgstation.Server.Host/Components/Deployment/DreamMaker.cs +++ b/src/Tgstation.Server.Host/Components/Deployment/DreamMaker.cs @@ -12,8 +12,8 @@ using Tgstation.Server.Host.Components.Byond; using Tgstation.Server.Host.Components.Chat; using Tgstation.Server.Host.Components.Repository; using Tgstation.Server.Host.Components.Watchdog; -using Tgstation.Server.Host.Core; using Tgstation.Server.Host.IO; +using Tgstation.Server.Host.Jobs; using Tgstation.Server.Host.System; namespace Tgstation.Server.Host.Components.Deployment diff --git a/src/Tgstation.Server.Host/Components/IInstance.cs b/src/Tgstation.Server.Host/Components/IInstance.cs index e8db125904..49eaa0b8d1 100644 --- a/src/Tgstation.Server.Host/Components/IInstance.cs +++ b/src/Tgstation.Server.Host/Components/IInstance.cs @@ -62,7 +62,7 @@ namespace Tgstation.Server.Host.Components Task SetAutoUpdateInterval(uint newInterval); /// - /// Run the compile job and insert it into the database. Meant to be called by a + /// Run the compile job and insert it into the database. Meant to be called by a /// /// The running /// The for the operation diff --git a/src/Tgstation.Server.Host/Components/Instance.cs b/src/Tgstation.Server.Host/Components/Instance.cs index 69557d96af..a1806e6aa1 100644 --- a/src/Tgstation.Server.Host/Components/Instance.cs +++ b/src/Tgstation.Server.Host/Components/Instance.cs @@ -15,6 +15,7 @@ using Tgstation.Server.Host.Components.Repository; using Tgstation.Server.Host.Components.Watchdog; using Tgstation.Server.Host.Core; using Tgstation.Server.Host.Database; +using Tgstation.Server.Host.Jobs; using Tgstation.Server.Host.Models; namespace Tgstation.Server.Host.Components diff --git a/src/Tgstation.Server.Host/Components/InstanceFactory.cs b/src/Tgstation.Server.Host/Components/InstanceFactory.cs index 806ab875e8..41a91b5a25 100644 --- a/src/Tgstation.Server.Host/Components/InstanceFactory.cs +++ b/src/Tgstation.Server.Host/Components/InstanceFactory.cs @@ -12,6 +12,7 @@ using Tgstation.Server.Host.Components.Watchdog; using Tgstation.Server.Host.Core; using Tgstation.Server.Host.Database; using Tgstation.Server.Host.IO; +using Tgstation.Server.Host.Jobs; using Tgstation.Server.Host.Security; using Tgstation.Server.Host.System; diff --git a/src/Tgstation.Server.Host/Components/InstanceManager.cs b/src/Tgstation.Server.Host/Components/InstanceManager.cs index 929df490ef..28fbc31558 100644 --- a/src/Tgstation.Server.Host/Components/InstanceManager.cs +++ b/src/Tgstation.Server.Host/Components/InstanceManager.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using Tgstation.Server.Host.Core; using Tgstation.Server.Host.Database; using Tgstation.Server.Host.IO; +using Tgstation.Server.Host.Jobs; namespace Tgstation.Server.Host.Components { diff --git a/src/Tgstation.Server.Host/Components/Repository/CredentialsProvider.cs b/src/Tgstation.Server.Host/Components/Repository/CredentialsProvider.cs index 23c2cdb7f2..80112f3e47 100644 --- a/src/Tgstation.Server.Host/Components/Repository/CredentialsProvider.cs +++ b/src/Tgstation.Server.Host/Components/Repository/CredentialsProvider.cs @@ -2,7 +2,7 @@ using LibGit2Sharp.Handlers; using Microsoft.Extensions.Logging; using System; -using Tgstation.Server.Host.Core; +using Tgstation.Server.Host.Jobs; namespace Tgstation.Server.Host.Components.Repository { diff --git a/src/Tgstation.Server.Host/Components/Repository/Repository.cs b/src/Tgstation.Server.Host/Components/Repository/Repository.cs index 3363f1e8c8..840250c810 100644 --- a/src/Tgstation.Server.Host/Components/Repository/Repository.cs +++ b/src/Tgstation.Server.Host/Components/Repository/Repository.cs @@ -8,8 +8,8 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; using Tgstation.Server.Api.Models; -using Tgstation.Server.Host.Core; using Tgstation.Server.Host.IO; +using Tgstation.Server.Host.Jobs; namespace Tgstation.Server.Host.Components.Repository { diff --git a/src/Tgstation.Server.Host/Components/Watchdog/BasicWatchdog.cs b/src/Tgstation.Server.Host/Components/Watchdog/BasicWatchdog.cs index d12d3e766f..687b497fcf 100644 --- a/src/Tgstation.Server.Host/Components/Watchdog/BasicWatchdog.cs +++ b/src/Tgstation.Server.Host/Components/Watchdog/BasicWatchdog.cs @@ -10,6 +10,7 @@ using Tgstation.Server.Host.Components.Chat; using Tgstation.Server.Host.Components.Deployment; using Tgstation.Server.Host.Core; using Tgstation.Server.Host.Database; +using Tgstation.Server.Host.Jobs; namespace Tgstation.Server.Host.Components.Watchdog { diff --git a/src/Tgstation.Server.Host/Components/Watchdog/ExperimentalWatchdog.cs b/src/Tgstation.Server.Host/Components/Watchdog/ExperimentalWatchdog.cs index 0af4aa8101..7bd0a1235c 100644 --- a/src/Tgstation.Server.Host/Components/Watchdog/ExperimentalWatchdog.cs +++ b/src/Tgstation.Server.Host/Components/Watchdog/ExperimentalWatchdog.cs @@ -11,6 +11,7 @@ using Tgstation.Server.Host.Components.Chat; using Tgstation.Server.Host.Components.Deployment; using Tgstation.Server.Host.Core; using Tgstation.Server.Host.Database; +using Tgstation.Server.Host.Jobs; namespace Tgstation.Server.Host.Components.Watchdog { diff --git a/src/Tgstation.Server.Host/Components/Watchdog/WatchdogBase.cs b/src/Tgstation.Server.Host/Components/Watchdog/WatchdogBase.cs index fbdc68d3a9..7050b3b998 100644 --- a/src/Tgstation.Server.Host/Components/Watchdog/WatchdogBase.cs +++ b/src/Tgstation.Server.Host/Components/Watchdog/WatchdogBase.cs @@ -19,6 +19,7 @@ using Tgstation.Server.Host.Components.Interop; using Tgstation.Server.Host.Core; using Tgstation.Server.Host.Database; using Tgstation.Server.Host.Extensions; +using Tgstation.Server.Host.Jobs; namespace Tgstation.Server.Host.Components.Watchdog { diff --git a/src/Tgstation.Server.Host/Components/Watchdog/WatchdogFactory.cs b/src/Tgstation.Server.Host/Components/Watchdog/WatchdogFactory.cs index 7adf29c6a3..db2830b18a 100644 --- a/src/Tgstation.Server.Host/Components/Watchdog/WatchdogFactory.cs +++ b/src/Tgstation.Server.Host/Components/Watchdog/WatchdogFactory.cs @@ -9,6 +9,7 @@ using Tgstation.Server.Host.Configuration; using Tgstation.Server.Host.Core; using Tgstation.Server.Host.Database; using Tgstation.Server.Host.IO; +using Tgstation.Server.Host.Jobs; namespace Tgstation.Server.Host.Components.Watchdog { diff --git a/src/Tgstation.Server.Host/Components/Watchdog/WindowsWatchdog.cs b/src/Tgstation.Server.Host/Components/Watchdog/WindowsWatchdog.cs index b5f174d45c..795ba9c2e2 100644 --- a/src/Tgstation.Server.Host/Components/Watchdog/WindowsWatchdog.cs +++ b/src/Tgstation.Server.Host/Components/Watchdog/WindowsWatchdog.cs @@ -10,6 +10,7 @@ using Tgstation.Server.Host.Components.Deployment; using Tgstation.Server.Host.Core; using Tgstation.Server.Host.Database; using Tgstation.Server.Host.IO; +using Tgstation.Server.Host.Jobs; namespace Tgstation.Server.Host.Components.Watchdog { diff --git a/src/Tgstation.Server.Host/Components/Watchdog/WindowsWatchdogFactory.cs b/src/Tgstation.Server.Host/Components/Watchdog/WindowsWatchdogFactory.cs index 7e4f64c968..348b885422 100644 --- a/src/Tgstation.Server.Host/Components/Watchdog/WindowsWatchdogFactory.cs +++ b/src/Tgstation.Server.Host/Components/Watchdog/WindowsWatchdogFactory.cs @@ -9,6 +9,7 @@ using Tgstation.Server.Host.Configuration; using Tgstation.Server.Host.Core; using Tgstation.Server.Host.Database; using Tgstation.Server.Host.IO; +using Tgstation.Server.Host.Jobs; namespace Tgstation.Server.Host.Components.Watchdog { diff --git a/src/Tgstation.Server.Host/Controllers/ByondController.cs b/src/Tgstation.Server.Host/Controllers/ByondController.cs index 1b25c67941..963007b4d7 100644 --- a/src/Tgstation.Server.Host/Controllers/ByondController.cs +++ b/src/Tgstation.Server.Host/Controllers/ByondController.cs @@ -9,8 +9,8 @@ using Tgstation.Server.Api; using Tgstation.Server.Api.Models; using Tgstation.Server.Api.Rights; using Tgstation.Server.Host.Components; -using Tgstation.Server.Host.Core; using Tgstation.Server.Host.Database; +using Tgstation.Server.Host.Jobs; using Tgstation.Server.Host.Models; using Tgstation.Server.Host.Security; diff --git a/src/Tgstation.Server.Host/Controllers/DreamDaemonController.cs b/src/Tgstation.Server.Host/Controllers/DreamDaemonController.cs index 705b48680e..a160198a49 100644 --- a/src/Tgstation.Server.Host/Controllers/DreamDaemonController.cs +++ b/src/Tgstation.Server.Host/Controllers/DreamDaemonController.cs @@ -13,8 +13,8 @@ using Tgstation.Server.Api.Models; using Tgstation.Server.Api.Rights; using Tgstation.Server.Host.Components; using Tgstation.Server.Host.Components.Watchdog; -using Tgstation.Server.Host.Core; using Tgstation.Server.Host.Database; +using Tgstation.Server.Host.Jobs; using Tgstation.Server.Host.Models; using Tgstation.Server.Host.Security; diff --git a/src/Tgstation.Server.Host/Controllers/DreamMakerController.cs b/src/Tgstation.Server.Host/Controllers/DreamMakerController.cs index 3ae902446f..89615d0e47 100644 --- a/src/Tgstation.Server.Host/Controllers/DreamMakerController.cs +++ b/src/Tgstation.Server.Host/Controllers/DreamMakerController.cs @@ -11,8 +11,8 @@ using Tgstation.Server.Api; using Tgstation.Server.Api.Models; using Tgstation.Server.Api.Rights; using Tgstation.Server.Host.Components; -using Tgstation.Server.Host.Core; using Tgstation.Server.Host.Database; +using Tgstation.Server.Host.Jobs; using Tgstation.Server.Host.Models; using Tgstation.Server.Host.Security; diff --git a/src/Tgstation.Server.Host/Controllers/InstanceController.cs b/src/Tgstation.Server.Host/Controllers/InstanceController.cs index 46a1f46c20..68df42bba5 100644 --- a/src/Tgstation.Server.Host/Controllers/InstanceController.cs +++ b/src/Tgstation.Server.Host/Controllers/InstanceController.cs @@ -18,6 +18,7 @@ using Tgstation.Server.Host.Components; using Tgstation.Server.Host.Core; using Tgstation.Server.Host.Database; using Tgstation.Server.Host.IO; +using Tgstation.Server.Host.Jobs; using Tgstation.Server.Host.Models; using Tgstation.Server.Host.Security; using Tgstation.Server.Host.System; diff --git a/src/Tgstation.Server.Host/Controllers/JobController.cs b/src/Tgstation.Server.Host/Controllers/JobController.cs index 7b05ec21ba..c0a0bfd80d 100644 --- a/src/Tgstation.Server.Host/Controllers/JobController.cs +++ b/src/Tgstation.Server.Host/Controllers/JobController.cs @@ -8,8 +8,8 @@ using System.Net; using System.Threading; using System.Threading.Tasks; using Tgstation.Server.Api; -using Tgstation.Server.Host.Core; using Tgstation.Server.Host.Database; +using Tgstation.Server.Host.Jobs; using Tgstation.Server.Host.Models; using Tgstation.Server.Host.Security; diff --git a/src/Tgstation.Server.Host/Controllers/RepositoryController.cs b/src/Tgstation.Server.Host/Controllers/RepositoryController.cs index 36e612e91a..aba60c5dbd 100644 --- a/src/Tgstation.Server.Host/Controllers/RepositoryController.cs +++ b/src/Tgstation.Server.Host/Controllers/RepositoryController.cs @@ -18,6 +18,7 @@ using Tgstation.Server.Host.Components; using Tgstation.Server.Host.Configuration; using Tgstation.Server.Host.Core; using Tgstation.Server.Host.Database; +using Tgstation.Server.Host.Jobs; using Tgstation.Server.Host.Models; using Tgstation.Server.Host.Security; diff --git a/src/Tgstation.Server.Host/Core/Application.cs b/src/Tgstation.Server.Host/Core/Application.cs index b822549d2a..ad03584087 100644 --- a/src/Tgstation.Server.Host/Core/Application.cs +++ b/src/Tgstation.Server.Host/Core/Application.cs @@ -34,6 +34,7 @@ using Tgstation.Server.Host.Configuration; using Tgstation.Server.Host.Database; using Tgstation.Server.Host.Extensions; using Tgstation.Server.Host.IO; +using Tgstation.Server.Host.Jobs; using Tgstation.Server.Host.Security; using Tgstation.Server.Host.System; diff --git a/src/Tgstation.Server.Host/Core/IJobManager.cs b/src/Tgstation.Server.Host/Jobs/IJobManager.cs similarity index 98% rename from src/Tgstation.Server.Host/Core/IJobManager.cs rename to src/Tgstation.Server.Host/Jobs/IJobManager.cs index 085023b68f..4dadd50ae6 100644 --- a/src/Tgstation.Server.Host/Core/IJobManager.cs +++ b/src/Tgstation.Server.Host/Jobs/IJobManager.cs @@ -5,7 +5,7 @@ using System.Threading.Tasks; using Tgstation.Server.Host.Database; using Tgstation.Server.Host.Models; -namespace Tgstation.Server.Host.Core +namespace Tgstation.Server.Host.Jobs { /// /// Manages the runtime of s diff --git a/src/Tgstation.Server.Host/Core/JobException.cs b/src/Tgstation.Server.Host/Jobs/JobException.cs similarity index 96% rename from src/Tgstation.Server.Host/Core/JobException.cs rename to src/Tgstation.Server.Host/Jobs/JobException.cs index fbf4449365..40469a0e59 100644 --- a/src/Tgstation.Server.Host/Core/JobException.cs +++ b/src/Tgstation.Server.Host/Jobs/JobException.cs @@ -1,6 +1,6 @@ using System; -namespace Tgstation.Server.Host.Core +namespace Tgstation.Server.Host.Jobs { /// /// Operation exceptions thrown from the context of a diff --git a/src/Tgstation.Server.Host/Core/JobHandler.cs b/src/Tgstation.Server.Host/Jobs/JobHandler.cs similarity index 98% rename from src/Tgstation.Server.Host/Core/JobHandler.cs rename to src/Tgstation.Server.Host/Jobs/JobHandler.cs index e09f574581..072b075fe2 100644 --- a/src/Tgstation.Server.Host/Core/JobHandler.cs +++ b/src/Tgstation.Server.Host/Jobs/JobHandler.cs @@ -2,7 +2,7 @@ using System.Threading; using System.Threading.Tasks; -namespace Tgstation.Server.Host.Core +namespace Tgstation.Server.Host.Jobs { /// /// Class for pairing s with s diff --git a/src/Tgstation.Server.Host/Core/JobManager.cs b/src/Tgstation.Server.Host/Jobs/JobManager.cs similarity index 99% rename from src/Tgstation.Server.Host/Core/JobManager.cs rename to src/Tgstation.Server.Host/Jobs/JobManager.cs index c26b30964d..129d740664 100644 --- a/src/Tgstation.Server.Host/Core/JobManager.cs +++ b/src/Tgstation.Server.Host/Jobs/JobManager.cs @@ -8,7 +8,7 @@ using System.Threading.Tasks; using Tgstation.Server.Host.Database; using Tgstation.Server.Host.Models; -namespace Tgstation.Server.Host.Core +namespace Tgstation.Server.Host.Jobs { /// sealed class JobManager : IJobManager, IDisposable diff --git a/tests/Tgstation.Server.Host.Tests/Components/Watchdog/TestExperimentalWatchdog.cs b/tests/Tgstation.Server.Host.Tests/Components/Watchdog/TestExperimentalWatchdog.cs index 53aac5a295..fbff4d209e 100644 --- a/tests/Tgstation.Server.Host.Tests/Components/Watchdog/TestExperimentalWatchdog.cs +++ b/tests/Tgstation.Server.Host.Tests/Components/Watchdog/TestExperimentalWatchdog.cs @@ -11,6 +11,7 @@ using Tgstation.Server.Host.Components.Chat; using Tgstation.Server.Host.Components.Deployment; using Tgstation.Server.Host.Core; using Tgstation.Server.Host.Database; +using Tgstation.Server.Host.Jobs; namespace Tgstation.Server.Host.Components.Watchdog.Tests { diff --git a/tests/Tgstation.Server.Host.Tests/Core/TestJobException.cs b/tests/Tgstation.Server.Host.Tests/Jobs/TestJobException.cs similarity index 87% rename from tests/Tgstation.Server.Host.Tests/Core/TestJobException.cs rename to tests/Tgstation.Server.Host.Tests/Jobs/TestJobException.cs index 9f5abc5235..fa017d17ab 100644 --- a/tests/Tgstation.Server.Host.Tests/Core/TestJobException.cs +++ b/tests/Tgstation.Server.Host.Tests/Jobs/TestJobException.cs @@ -1,7 +1,7 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using System; -namespace Tgstation.Server.Host.Core.Tests +namespace Tgstation.Server.Host.Jobs.Tests { [TestClass] public sealed class TestJobException diff --git a/tests/Tgstation.Server.Host.Tests/Core/TestJobHandler.cs b/tests/Tgstation.Server.Host.Tests/Jobs/TestJobHandler.cs similarity index 97% rename from tests/Tgstation.Server.Host.Tests/Core/TestJobHandler.cs rename to tests/Tgstation.Server.Host.Tests/Jobs/TestJobHandler.cs index 4aad145fa5..3326de98fd 100644 --- a/tests/Tgstation.Server.Host.Tests/Core/TestJobHandler.cs +++ b/tests/Tgstation.Server.Host.Tests/Jobs/TestJobHandler.cs @@ -3,7 +3,7 @@ using System; using System.Threading; using System.Threading.Tasks; -namespace Tgstation.Server.Host.Core.Tests +namespace Tgstation.Server.Host.Jobs.Tests { [TestClass] public sealed class TestJobHandler