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
<PackageReference Include="Soenneker.Runners.Redis.Locks" Version="11.0.826" />
<PackageVersion Include="Soenneker.Runners.Redis.Locks" Version="11.0.826" />
<PackageReference Include="Soenneker.Runners.Redis.Locks" />
paket add Soenneker.Runners.Redis.Locks --version 11.0.826
#r "nuget: Soenneker.Runners.Redis.Locks, 11.0.826"
#:package Soenneker.Runners.Redis.Locks@11.0.826
#addin nuget:?package=Soenneker.Runners.Redis.Locks&version=11.0.826
#tool nuget:?package=Soenneker.Runners.Redis.Locks&version=11.0.826
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 | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Soenneker.Redis.Lock (>= 11.0.2979)
- Soenneker.Runners.Runner (>= 4.0.556)
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 |
Update dependency Soenneker.Redis.Lock to 11.0.2979 (#1497)