Added support for sync notification handlers in the event aggregator

This commit is contained in:
Bjarke Berg
2021-01-19 09:57:55 +01:00
parent 9d0665e66c
commit 69724d8d2b
11 changed files with 146 additions and 27 deletions

View File

@@ -1,5 +1,3 @@
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Umbraco.Core.Events;
using Umbraco.Core.Persistence;
@@ -39,7 +37,7 @@ namespace Umbraco.Infrastructure.Cache
}
/// <inheritdoc/>
public Task HandleAsync(UmbracoApplicationStarting notification, CancellationToken cancellationToken)
public void Handle(UmbracoApplicationStarting notification)
{
// The scheduled tasks - TouchServerTask and InstructionProcessTask - run as .NET Core hosted services.
// The former (as well as other hosted services that run outside of an HTTP request context) depends on the application URL
@@ -50,8 +48,6 @@ namespace Umbraco.Infrastructure.Cache
_requestAccessor.EndRequest += EndRequest;
Startup();
return Task.CompletedTask;
}
private void Startup()