Corfedo.Work.InMemory
0.10.0
Prefix Reserved
See the version list below for details.
dotnet add package Corfedo.Work.InMemory --version 0.10.0
NuGet\Install-Package Corfedo.Work.InMemory -Version 0.10.0
<PackageReference Include="Corfedo.Work.InMemory" Version="0.10.0" />
<PackageVersion Include="Corfedo.Work.InMemory" Version="0.10.0" />
<PackageReference Include="Corfedo.Work.InMemory" />
paket add Corfedo.Work.InMemory --version 0.10.0
#r "nuget: Corfedo.Work.InMemory, 0.10.0"
#:package Corfedo.Work.InMemory@0.10.0
#addin nuget:?package=Corfedo.Work.InMemory&version=0.10.0
#tool nuget:?package=Corfedo.Work.InMemory&version=0.10.0
Corfedo Work
Background work for .NET that lives in your database and commits in your transactions: jobs and cron schedules, leases on your own rows with fenced writes, reconciliation and commit-time wake-ups. A rollback leaves no work behind, and a crashed worker's work is picked up again. There is no broker and no scheduler process. It runs on PostgreSQL and SQL Server.
Install the package for your database, which brings in Corfedo.Work:
dotnet add package Corfedo.Work.PostgreSql # or Corfedo.Work.SqlServer
public sealed record WelcomeArgs(long UserId);
public static class Jobs
{
public static readonly JobDefinition<WelcomeArgs> Welcome = JobDefinition.Create<WelcomeArgs>("users.welcome");
}
public sealed class SendWelcome : IJobHandler<WelcomeArgs>
{
public async ValueTask<JobDisposition> RunAsync(WelcomeArgs args, JobRun run, CancellationToken ct)
{
// Send the email. A thrown exception retries the job after a backoff.
return JobResult.Completed;
}
}
// Program.cs
builder.Services.AddPostgreSqlWorkStore(); // the container's NpgsqlDataSource; or AddSqlServerWorkStore(connectionString)
builder.Services.AddWork(work => work.AddJob<WelcomeArgs, SendWelcome>(Jobs.Welcome));
// In the transaction that creates the user:
await jobs.RequestAsync(transaction, Jobs.Welcome, new WelcomeArgs(42));
The README has the full first example, and the guides cover jobs, leases, reconciliation, signals, transactions, testing and production.
Corfedo Work is licensed under Apache-2.0. Corfedo names, logos and brand assets are reserved; see the NOTICE file.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Corfedo.Work (= 0.10.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.14)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.14)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.