Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public sealed class LockOptionsResolver(
{
public LockOptions? Create(RequestedLockOptions requestedOptions)
{
log.Verbose($"Creating lock for lock options: {requestedOptions.Type} {requestedOptions.MutexName}");
var lockDirectory = lockDirectoryFactory.Create(requestedOptions.PreferredLockDirectory);

var lockFile = lockDirectory.GetLockFile($"ScriptIsolation.{requestedOptions.MutexName}.lock");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ IDisposable AcquireMutex(string name, string waitMessage)
[SupportedOSPlatform("windows")]
void SetFullAccessControlForAllUsers(Semaphore semaphore, string name)
{
log.Verbose($"Setting full control for all users on semaphore '{name}'");
var semaphoreSecurity = new SemaphoreSecurity();
var everyone = new SecurityIdentifier(WellKnownSidType.WorldSid, null);
var rule = new SemaphoreAccessRule(everyone, SemaphoreRights.FullControl, AccessControlType.Allow);
Expand All @@ -120,6 +121,7 @@ void SetFullAccessControlForAllUsers(Semaphore semaphore, string name)
try
{
semaphore.SetAccessControl(semaphoreSecurity);
log.Verbose($"Set full control for all users on semaphore '{name}'");
}
catch (Exception e)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,10 @@ public void ApplyRetention()
{
try
{
log.Verbose("Acquiring semaphore before applying package retention.");
using (AcquireSemaphore())
{
log.Verbose("Loading journal and applying retention.");
journalRepository.Load();
var packagesToRemove = retentionAlgorithms.SelectMany(algorithm => algorithm.GetPackagesToRemove(journalRepository.GetAllJournalEntries()));
foreach (var package in packagesToRemove)
Expand Down