Merge remote-tracking branch 'origin/v8/dev' into v9/dev
# Conflicts: # build/NuSpecs/UmbracoCms.Web.nuspec # src/Umbraco.Core/Dashboards/DashboardCollectionBuilder.cs # src/Umbraco.Examine/Umbraco.Examine.csproj # src/Umbraco.Examine/UmbracoExamineIndex.cs # src/Umbraco.ModelsBuilder.Embedded/Compose/ModelsBuilderComposer.cs # src/Umbraco.TestData/LoadTestController.cs # src/Umbraco.Tests.UnitTests/Umbraco.Core/Composing/CollectionBuildersTests.cs # src/Umbraco.Web.UI.Client/package-lock.json # src/Umbraco.Web.UI.Client/package.json # src/Umbraco.Web.UI.NetCore/umbraco/config/lang/da.xml # src/Umbraco.Web.UI.NetCore/umbraco/config/lang/en.xml # src/Umbraco.Web.UI.NetCore/umbraco/config/lang/en_us.xml # src/Umbraco.Web/Editors/KeepAliveController.cs # src/Umbraco.Web/Routing/PublishedContentNotFoundHandler.cs
This commit is contained in:
@@ -13,6 +13,9 @@ using Umbraco.Cms.Core.DependencyInjection;
|
||||
using Umbraco.Cms.Core.Models;
|
||||
using Umbraco.Cms.Core.Services;
|
||||
using Umbraco.Cms.Core.Strings;
|
||||
using System.IO;
|
||||
using Umbraco.Cms.Core;
|
||||
using Umbraco.Cms.Core.Hosting;
|
||||
|
||||
// see https://github.com/Shazwazza/UmbracoScripts/tree/master/src/LoadTesting
|
||||
|
||||
@@ -20,10 +23,14 @@ namespace Umbraco.TestData
|
||||
{
|
||||
public class LoadTestController : Controller
|
||||
{
|
||||
public LoadTestController(ServiceContext serviceContext, IShortStringHelper shortStringHelper)
|
||||
public LoadTestController(
|
||||
ServiceContext serviceContext,
|
||||
IShortStringHelper shortStringHelper,
|
||||
IHostingEnvironment hostingEnvironment)
|
||||
{
|
||||
_serviceContext = serviceContext;
|
||||
_shortStringHelper = shortStringHelper;
|
||||
_hostingEnvironment = hostingEnvironment;
|
||||
}
|
||||
|
||||
private static readonly Random _random = new Random();
|
||||
@@ -101,6 +108,7 @@ namespace Umbraco.TestData
|
||||
" + FootHtml;
|
||||
private readonly ServiceContext _serviceContext;
|
||||
private readonly IShortStringHelper _shortStringHelper;
|
||||
private readonly IHostingEnvironment _hostingEnvironment;
|
||||
|
||||
private ActionResult ContentHtml(string s)
|
||||
{
|
||||
@@ -266,6 +274,15 @@ namespace Umbraco.TestData
|
||||
HttpRuntime.UnloadAppDomain();
|
||||
}
|
||||
|
||||
public ActionResult ColdBootRestart()
|
||||
{
|
||||
Directory.Delete(_hostingEnvironment.MapPathContentRoot(Path.Combine(Constants.SystemDirectories.TempData,"DistCache")), true);
|
||||
|
||||
DoRestart();
|
||||
|
||||
return Content("Cold Boot Restarted.");
|
||||
}
|
||||
|
||||
public ActionResult Restart()
|
||||
{
|
||||
DoRestart();
|
||||
|
||||
Reference in New Issue
Block a user