NetCore: Migrated database server registrar and messenger tasks into hosted services (#9353)

* Migrated database server registrar and messenger tasks into hosted services.
Moved DatabaseServerRegistrar Options into injectable configuration.

* Added further cases for unit tests on hosted services checking execution based on runtime level.

* Migrated DatabaseServerMessengerOptions into configuration.
This commit is contained in:
Andy Butland
2020-11-10 20:02:09 +01:00
committed by GitHub
parent 3f5f85880e
commit b4ce2873cc
21 changed files with 424 additions and 306 deletions

View File

@@ -25,6 +25,7 @@ using Umbraco.Core.Persistence;
using Umbraco.Core.Persistence.SqlSyntax;
using Umbraco.Core.Runtime;
using Umbraco.Infrastructure.HostedServices;
using Umbraco.Infrastructure.HostedServices.ServerRegistration;
using Umbraco.Web.Common.AspNetCore;
using Umbraco.Web.Common.Profiler;
using ConnectionStrings = Umbraco.Core.Configuration.Models.ConnectionStrings;
@@ -298,6 +299,9 @@ namespace Umbraco.Extensions
services.AddHostedService<ScheduledPublishing>();
services.AddHostedService<TempFileCleanup>();
services.AddHostedService<InstructionProcessTask>();
services.AddHostedService<TouchServerTask>();
return services;
}