Soenneker.Runners.Redis.Locks 11.0.826

Prefix Reserved
dotnet add package Soenneker.Runners.Redis.Locks --version 11.0.826
                    
NuGet\Install-Package Soenneker.Runners.Redis.Locks -Version 11.0.826
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Runners.Redis.Locks" Version="11.0.826" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Runners.Redis.Locks" Version="11.0.826" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Runners.Redis.Locks" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Runners.Redis.Locks --version 11.0.826
                    
#r "nuget: Soenneker.Runners.Redis.Locks, 11.0.826"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Runners.Redis.Locks@11.0.826
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Runners.Redis.Locks&version=11.0.826
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Runners.Redis.Locks&version=11.0.826
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.Runners.Redis.Locks

A DI-ready runner for clearing a known set of stale distributed Redis locks.

Installation

dotnet add package Soenneker.Runners.Redis.Locks

Registration

using Soenneker.Runners.Redis.Locks.Registrars;

services.AddRedisLocksRunnerAsSingleton();

Scoped registration is also available:

services.AddRedisLocksRunnerAsScoped();

Choose the lifetime that matches the service consuming the runner. The registrar also registers its Redis lock and Microsoft Teams dependencies with the same lifetime.

Usage

using Soenneker.Runners.Redis.Locks.Abstract;

public sealed class StartupRecovery(IRedisLocksRunner redisLocksRunner)
{
    public Task ClearStaleLocks(CancellationToken cancellationToken)
    {
        return redisLocksRunner.ReleaseLocks(
            ["jobs:import", "jobs:export"],
            cancellationToken);
    }
}

ReleaseLocks force-deletes each supplied Redis key without checking an ownership token. Use it only during controlled recovery when no valid owner can still be using those locks. It is not a substitute for releasing a normally acquired lock through its handle.

Keys are processed sequentially. Cancellation or a Redis failure stops processing and is propagated to the caller, so keys earlier in the sequence may already have been removed.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.826 0 11/15/2026
11.0.825 75 11/12/2026
11.0.824 119 11/11/2026
11.0.823 101 11/11/2026
11.0.822 83 11/11/2026
11.0.821 84 11/11/2026
11.0.820 269 11/3/2026
11.0.819 95 11/3/2026
11.0.818 91 11/3/2026
11.0.817 88 11/3/2026
11.0.816 88 11/3/2026
11.0.815 90 11/3/2026
11.0.814 91 11/3/2026
11.0.813 86 11/3/2026
11.0.812 101 11/2/2026
11.0.811 93 11/2/2026
11.0.810 118 10/31/2026
11.0.809 97 10/30/2026
11.0.808 97 10/29/2026
11.0.807 101 10/29/2026
Loading failed

Update dependency Soenneker.Redis.Lock to 11.0.2979 (#1497)