BccCode.Privacy.Jobs 0.22.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package BccCode.Privacy.Jobs --version 0.22.0
                    
NuGet\Install-Package BccCode.Privacy.Jobs -Version 0.22.0
                    
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="BccCode.Privacy.Jobs" Version="0.22.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BccCode.Privacy.Jobs" Version="0.22.0" />
                    
Directory.Packages.props
<PackageReference Include="BccCode.Privacy.Jobs" />
                    
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 BccCode.Privacy.Jobs --version 0.22.0
                    
#r "nuget: BccCode.Privacy.Jobs, 0.22.0"
                    
#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 BccCode.Privacy.Jobs@0.22.0
                    
#: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=BccCode.Privacy.Jobs&version=0.22.0
                    
Install as a Cake Addin
#tool nuget:?package=BccCode.Privacy.Jobs&version=0.22.0
                    
Install as a Cake Tool

BccCode.Privacy.Jobs

The privacy job (LIB-24). Per row it works out what each process keeps, and then:

  • blanks exactly the fields of the categories no process keeps, in the row and, with ChangeHistory, in every version of its history (nested fields and the mapped fields of every collection item included);
  • replaces the person with the org's pseudonym when no keeping process needs them identified;
  • erases the row, its children, and its history when nothing keeps anything in it, and leaves a tombstone;
  • deletes the pseudonym's key with the person's last pseudonymised row.

A process keeps its categories in a row while its where: matches, a basis covers the data subject (consent, a group's membership, or a legal basis the application writes; everyone, with no data-subject groups), its period runs, and no upheld objection stops it. Rows of a person with a restriction (Art. 18) or an objection being assessed are left alone and counted. Reduction never goes back.

builder.Services.AddPrivacy<AppDbContext>(models);
builder.Services.AddPrivacyChangeHistory();          // optional: rewrite history too
builder.Services.AddPrivacyJobs<AppDbContext>(o => o.ControllerOrg = controllerOrg);

var jobs = app.Services.GetRequiredService<IPrivacyJobs>();
var pending = await jobs.GetPendingAsync();
var result = await jobs.RunDueAsync(reason: "nightly");
var plan = await jobs.PlanErasureAsync(orgUid, personUid);
IPrivacyJobs Does
GetPendingAsync(entity:, personUid:, orgUid:, kind:, dueBefore:, limit:) What is due; never writes
PreviewAsync(operation) Exactly what applying would change; never writes
ApplyAsync(operation(s), reason:) Applies, narrowed with ForRows or ForPersons
PlanErasureAsync(orgUid, personUid) An erasure request: what may be erased, and refusals with reasons
RunDueAsync(dryRun:, maximumRows:, reason:) Everything due now, queued erasure requests, package-table retention, verify
GetLogAsync(from:, to:, entity:, kind:, limit:) What was done, as counts; no person uids

The job runs through IPrivacyContextFactory<TContext>.ForJob(reason): mapped straight to the tables, and the save keeps the allowed_processes the job sets. Batches hold at most 500 rows; each is loaded fresh and saved once through a new context (pseudonyms and tombstones first). Without ChangeHistory the rows are saved through that context too, and the privacy columns are concurrency tokens, so a row the application changed meanwhile fails the batch, which the next run redoes.

With ChangeHistory (AddPrivacyChangeHistory()), the job sets a business event context (privacy-job, with the reason) for its save, which ChangeHistory requires. ChangeHistory allows one business action per context and maintenance only on a fresh one, so each further step opens a fresh job context: RewriteAsync (blanks, and the person replaced with the pseudonym, in the row and every version), then the privacy columns (not versioned) by ExecuteUpdate, then EraseByIdAsync (rows with their history), children before parents. The rewrite records one version of its own.

Metrics (meter BccCode.Privacy.Jobs): privacy_job.seconds_since_success, privacy_job.overdue_rows, privacy_job.drift_rows.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on BccCode.Privacy.Jobs:

Package Downloads
BccCode.Privacy.Hosting

One AddPrivacy() for BCC Privacy: the EF Core, ASP.NET Core and Wolverine packages wired together, defaults per environment, the privacy document at /.well-known/bcc-privacy, and the application's processes and data items pushed to the Privacy API at deploy.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.27.1 0 11/24/2026
0.27.0 0 11/24/2026
0.26.0 0 11/24/2026
0.25.1 0 11/24/2026
0.25.0 7 11/24/2026
0.24.0 9 11/24/2026
0.23.6 8 11/24/2026
0.23.5 9 11/24/2026
0.23.4 10 11/24/2026
0.23.3 45 11/24/2026
0.23.2 56 11/24/2026
0.23.1 49 11/24/2026
0.23.0 45 11/24/2026
0.22.0 47 11/24/2026