Fix up after merge
This commit is contained in:
@@ -11,8 +11,7 @@ internal class FileSystemMainDomLock : IMainDomLock
|
||||
{
|
||||
private readonly CancellationTokenSource _cancellationTokenSource = new();
|
||||
private readonly IHostingEnvironment _hostingEnvironment;
|
||||
private readonly IHostingEnvironment _hostingEnvironment;
|
||||
private readonly IOptionsMonitor<GlobalSettings> _globalSettings;
|
||||
private readonly IOptionsMonitor<GlobalSettings> _globalSettings;
|
||||
private readonly string _lockFilePath;
|
||||
private readonly ILogger<FileSystemMainDomLock> _logger;
|
||||
private readonly string _releaseSignalFilePath;
|
||||
@@ -28,7 +27,7 @@ internal class FileSystemMainDomLock : IMainDomLock
|
||||
{
|
||||
_logger = logger;
|
||||
_hostingEnvironment = hostingEnvironment;
|
||||
_globalSettings = globalSettings;
|
||||
_globalSettings = globalSettings;
|
||||
|
||||
var lockFileName = $"MainDom_{mainDomKeyGenerator.GenerateKey()}.lock";
|
||||
_lockFilePath = Path.Combine(hostingEnvironment.LocalTempPath, lockFileName);
|
||||
@@ -44,7 +43,8 @@ internal class FileSystemMainDomLock : IMainDomLock
|
||||
{
|
||||
try
|
||||
{
|
||||
Directory.CreateDirectory(_hostingEnvironment.LocalTempPath);_logger.LogDebug("Attempting to obtain MainDom lock file handle {lockFilePath}", _lockFilePath);
|
||||
Directory.CreateDirectory(_hostingEnvironment.LocalTempPath);
|
||||
_logger.LogDebug("Attempting to obtain MainDom lock file handle {lockFilePath}", _lockFilePath);
|
||||
_lockFileStream = File.Open(_lockFilePath, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None);
|
||||
DeleteLockReleaseSignalFile();
|
||||
return Task.FromResult(true);
|
||||
@@ -65,8 +65,7 @@ internal class FileSystemMainDomLock : IMainDomLock
|
||||
_lockFileStream?.Close();
|
||||
return Task.FromResult(false);
|
||||
}
|
||||
}
|
||||
while (stopwatch.ElapsedMilliseconds < millisecondsTimeout);
|
||||
} while (stopwatch.ElapsedMilliseconds < millisecondsTimeout);
|
||||
|
||||
return Task.FromResult(false);
|
||||
}
|
||||
@@ -95,7 +94,8 @@ internal class FileSystemMainDomLock : IMainDomLock
|
||||
}
|
||||
|
||||
public void CreateLockReleaseSignalFile() =>
|
||||
File.Open(_releaseSignalFilePath, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.ReadWrite | FileShare.Delete)
|
||||
File.Open(_releaseSignalFilePath, FileMode.OpenOrCreate, FileAccess.ReadWrite,
|
||||
FileShare.ReadWrite | FileShare.Delete)
|
||||
.Close();
|
||||
|
||||
public void DeleteLockReleaseSignalFile() =>
|
||||
|
||||
@@ -10,9 +10,6 @@ using Umbraco.Cms.Core.Scoping;
|
||||
using Umbraco.Cms.Infrastructure.Persistence;
|
||||
using Umbraco.Cms.Web.Common.DependencyInjection;
|
||||
using Umbraco.Extensions;
|
||||
using Umbraco.Cms.Core.DistributedLocking;
|
||||
using Umbraco.Cms.Core.Scoping;
|
||||
using Umbraco.Cms.Web.Common.DependencyInjection;
|
||||
using CoreDebugSettings = Umbraco.Cms.Core.Configuration.Models.CoreDebugSettings;
|
||||
|
||||
#if DEBUG_SCOPES
|
||||
|
||||
@@ -27,7 +27,7 @@ internal sealed class OutgoingEditorModelEventAttribute : TypeFilterAttribute
|
||||
|
||||
private class OutgoingEditorModelEventFilter : IActionFilter
|
||||
{
|
||||
private readonly IBackOfficeSecurityAccessor _backOfficeSecurityAccessor;private readonly IUmbracoMapper _mapper;
|
||||
private readonly IBackOfficeSecurityAccessor _backOfficeSecurityAccessor;
|
||||
private readonly IEventAggregator _eventAggregator;
|
||||
private readonly IUmbracoMapper _mapper;
|
||||
private readonly IUmbracoContextAccessor _umbracoContextAccessor;
|
||||
|
||||
Reference in New Issue
Block a user