Merge remote-tracking branch 'origin/6.2.5' into 7.2.1

Conflicts:
	src/Umbraco.Core/Configuration/UmbracoSettings.cs
	src/Umbraco.Core/Sync/ServerEnvironmentHelper.cs
	src/Umbraco.Tests/Scheduling/BackgroundTaskRunnerTests.cs
	src/Umbraco.Tests/Umbraco.Tests.csproj
	src/Umbraco.Web.UI/install/steps/defaultUser.ascx
	src/Umbraco.Web.UI/web.Template.Debug.config
	src/Umbraco.Web/Scheduling/BackgroundTaskRunner.cs
	src/Umbraco.Web/Scheduling/IBackgroundTask.cs
	src/Umbraco.Web/Scheduling/KeepAlive.cs
	src/Umbraco.Web/Scheduling/LogScrubber.cs
	src/Umbraco.Web/Scheduling/ScheduledPublishing.cs
	src/Umbraco.Web/Scheduling/ScheduledTasks.cs
	src/Umbraco.Web/Scheduling/Scheduler.cs
	src/Umbraco.Web/Scheduling/TaskEventArgs.cs
	src/Umbraco.Web/Umbraco.Web.csproj
This commit is contained in:
Shannon
2014-12-08 17:16:16 +11:00
12 changed files with 33 additions and 18 deletions

View File

@@ -1,4 +1,4 @@
using System;
using System;
namespace Umbraco.Web.Scheduling
{

View File

@@ -35,7 +35,9 @@ namespace Umbraco.Web.Scheduling
}
catch (Exception ee)
{
LogHelper.Error<KeepAlive>("Error in ping", ee);
LogHelper.Error<KeepAlive>(
string.Format("Error in ping. The base url used in the request was: {0}, see http://our.umbraco.org/documentation/Using-Umbraco/Config-files/umbracoSettings/#ScheduledTasks documentation for details on setting a baseUrl if this is in error", umbracoBaseUrl)
, ee);
}
}
}

View File

@@ -8,7 +8,6 @@ using Umbraco.Core.Logging;
namespace Umbraco.Web.Scheduling
{
internal class LogScrubber : DisposableObject, IBackgroundTask
{
private readonly ApplicationContext _appContext;
@@ -49,6 +48,7 @@ namespace Umbraco.Web.Scheduling
{
Log.CleanLogs(GetLogScrubbingMaximumAge(_settings));
}
}
}
}
}

View File

@@ -42,6 +42,8 @@ namespace Umbraco.Web.Scheduling
_isPublishingRunning = true;
var umbracoBaseUrl = ServerEnvironmentHelper.GetCurrentServerUmbracoBaseUrl(_appContext);
try
{
var umbracoBaseUrl = ServerEnvironmentHelper.GetCurrentServerUmbracoBaseUrl(_appContext, _settings);
@@ -64,7 +66,9 @@ namespace Umbraco.Web.Scheduling
}
catch (Exception ee)
{
LogHelper.Error<ScheduledPublishing>("An error occurred with the scheduled publishing", ee);
LogHelper.Error<ScheduledPublishing>(
string.Format("An error occurred with the scheduled publishing. The base url used in the request was: {0}, see http://our.umbraco.org/documentation/Using-Umbraco/Config-files/umbracoSettings/#ScheduledTasks documentation for details on setting a baseUrl if this is in error", umbracoBaseUrl)
, ee);
}
finally
{

View File

@@ -21,7 +21,6 @@ namespace Umbraco.Web.Scheduling
private readonly ApplicationContext _appContext;
private readonly IUmbracoSettingsSection _settings;
private static readonly Hashtable ScheduledTaskTimes = new Hashtable();
private static bool _isPublishingRunning = false;
public ScheduledTasks(ApplicationContext appContext, IUmbracoSettingsSection settings)
@@ -32,8 +31,6 @@ namespace Umbraco.Web.Scheduling
private void ProcessTasks()
{
var scheduledTasks = _settings.ScheduledTasks.Tasks;
foreach (var t in scheduledTasks)
{

View File

@@ -100,6 +100,10 @@ namespace Umbraco.Web.Scheduling
_scrubberRunner.Add(new LogScrubber(appContext, settings));
}
private static void PerformLogScrub(ApplicationContext appContext)
{
_scrubberRunner.Add(new LogScrubber(appContext));
}
/// <summary>
/// This performs all of the scheduling on the one timer
/// </summary>
@@ -140,7 +144,6 @@ namespace Umbraco.Web.Scheduling
}
}
}
}
}

View File

@@ -1,4 +1,4 @@
using System;
using System;
namespace Umbraco.Web.Scheduling
{

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
@@ -493,7 +493,6 @@
<Compile Include="Mvc\UmbracoVirtualNodeRouteHandler.cs" />
<Compile Include="Routing\CustomRouteUrlProvider.cs" />
<Compile Include="Routing\UrlProviderExtensions.cs" />
<Compile Include="Scheduling\IBackgroundTask.cs" />
<Compile Include="Scheduling\TaskEventArgs.cs" />
<Compile Include="Strategies\Migrations\ClearCsrfCookiesAfterUpgrade.cs" />
<Compile Include="Strategies\Migrations\ClearMediaXmlCacheForDeletedItemsAfterUpgrade.cs" />
@@ -578,10 +577,12 @@
<Compile Include="Models\RegisterModel.cs" />
<Compile Include="Models\LoginModel.cs" />
<Compile Include="Editors\MediaTypeController.cs" />
<Compile Include="Scheduling\IBackgroundTask.cs" />
<Compile Include="Scheduling\KeepAlive.cs" />
<Compile Include="Scheduling\LogScrubber.cs" />
<Compile Include="Scheduling\ScheduledPublishing.cs" />
<Compile Include="Scheduling\ScheduledTasks.cs" />
<Compile Include="Scheduling\TaskEventArgs.cs" />
<Compile Include="Security\MembershipHelper.cs" />
<Compile Include="Editors\SectionController.cs" />
<Compile Include="Editors\UmbracoAuthorizedJsonController.cs" />