Suppress scope notifications during migrations

This commit is contained in:
Shannon
2021-08-17 11:13:46 -06:00
parent 4b7481955a
commit 4b57366ca0
15 changed files with 194 additions and 102 deletions

View File

@@ -22,6 +22,7 @@ using Umbraco.Cms.Core.Migrations;
using Umbraco.Cms.Core.Scoping;
using Microsoft.Extensions.Logging;
using System.Numerics;
using System.Threading.Tasks;
namespace Umbraco.Cms.Web.BackOffice.Controllers
{
@@ -117,7 +118,7 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers
}
[HttpPost]
public ActionResult<IEnumerable<InstalledPackage>> RunMigrations([FromQuery]string packageName)
public async Task<ActionResult<IEnumerable<InstalledPackage>>> RunMigrations([FromQuery]string packageName)
{
IReadOnlyDictionary<string, string> keyValues = _keyValueService.FindByKeyPrefix(Constants.Conventions.Migrations.KeyValuePrefix);
IReadOnlyList<string> pendingMigrations = _pendingPackageMigrations.GetPendingPackageMigrations(keyValues);
@@ -129,7 +130,7 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers
try
{
upgrader.Execute(_migrationPlanExecutor, _scopeProvider, _keyValueService);
await upgrader.ExecuteAsync(_migrationPlanExecutor, _scopeProvider, _keyValueService);
}
catch (Exception ex)
{