doc BatchedDatabaseServerMessenger startup
This commit is contained in:
@@ -11,23 +11,12 @@ namespace Umbraco.Web
|
||||
{
|
||||
protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
|
||||
{
|
||||
var msgr = ServerMessengerResolver.HasCurrent ? ServerMessengerResolver.Current.Messenger as BatchedDatabaseServerMessenger : null;
|
||||
var messenger = ServerMessengerResolver.HasCurrent
|
||||
? ServerMessengerResolver.Current.Messenger as BatchedDatabaseServerMessenger
|
||||
: null;
|
||||
|
||||
if (msgr == null) return;
|
||||
|
||||
UmbracoModule.EndRequest += msgr.UmbracoModule_EndRequest;
|
||||
UmbracoModule.RouteAttempt += msgr.UmbracoModule_RouteAttempt;
|
||||
|
||||
if (applicationContext.DatabaseContext.IsDatabaseConfigured == false || applicationContext.DatabaseContext.CanConnect == false)
|
||||
{
|
||||
applicationContext.ProfilingLogger.Logger.Warn<BatchedDatabaseServerMessenger>(
|
||||
"The app cannot connect to the database, this server cannot be initialized with "
|
||||
+ typeof(BatchedDatabaseServerMessenger) + ", distributed calls will not be enabled for this server");
|
||||
}
|
||||
else
|
||||
{
|
||||
msgr.Boot();
|
||||
}
|
||||
if (messenger != null)
|
||||
messenger.Startup();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user