Fixup CoreRuntime so it starts after Startup.Configure

Makes integration tests play nice with Components as RuntimeLevel will be correct
This commit is contained in:
Paul Johnson
2020-12-16 01:54:49 +00:00
parent 91e2f58822
commit 431403e372
9 changed files with 82 additions and 68 deletions

View File

@@ -135,16 +135,16 @@ namespace Umbraco.Web.PublishedCache.NuCache
_entitySerializer = entitySerializer;
_publishedModelFactory = publishedModelFactory;
// we always want to handle repository events, configured or not
// assuming no repository event will trigger before the whole db is ready
// (ideally we'd have Upgrading.App vs Upgrading.Data application states...)
InitializeRepositoryEvents();
_lifeTime.ApplicationInit += OnApplicationInit;
}
internal void OnApplicationInit(object sender, EventArgs e)
{
// we always want to handle repository events, configured or not
// assuming no repository event will trigger before the whole db is ready
// (ideally we'd have Upgrading.App vs Upgrading.Data application states...)
InitializeRepositoryEvents();
// however, the cache is NOT available until we are configured, because loading
// content (and content types) from database cannot be consistent (see notes in "Handle
// Notifications" region), so