Merge pull request #2338 from umbraco/temp-u4-10715

U4-10715 - scheduled publishing and LB issue
This commit is contained in:
Mikkel Holck Madsen
2017-11-30 10:57:12 +01:00
committed by GitHub
@@ -86,7 +86,16 @@ namespace Umbraco.Web.Scheduling
finally
{
if (tempContext != null)
{
// because we created an http context and assigned it to UmbracoContext,
// the batched messenger does batch instructions, but since there is no
// request, we need to explicitely tell it to flush the batch of instrs.
var batchedMessenger = ServerMessengerResolver.Current.Messenger as BatchedDatabaseServerMessenger;
if (batchedMessenger != null)
batchedMessenger.FlushBatch();
tempContext.Dispose(); // nulls the ThreadStatic context
}
}
return true; // repeat