Merge branch 'temp8-224-db-updates-sched-publishing-with-variants' into temp8-226-sched-pub-angular

This commit is contained in:
Shannon
2018-11-13 16:17:23 +11:00

View File

@@ -1,4 +1,5 @@
using System;
using System.Linq;
using Umbraco.Core;
using Umbraco.Core.Logging;
using Umbraco.Core.Services;
@@ -56,7 +57,10 @@ namespace Umbraco.Web.Scheduling
// fixme context & events during scheduled publishing?
// in v7 we create an UmbracoContext and an HttpContext, and cache instructions
// are batched, and we have to explicitly flush them, how is it going to work here?
_contentService.PerformScheduledPublish(DateTime.Now);
var result = _contentService.PerformScheduledPublish(DateTime.Now).ToList();
if (result.Count > 0)
foreach(var grouped in result.GroupBy(x => x.Result))
_logger.Info<ScheduledPublishing>("Scheduled publishing result: '{StatusCount}' items with status {Status}", grouped.Count(), grouped.Key);
}
catch (Exception ex)
{