Hide + archive stale listings (old jobs, expired shifts)
- ListingPolicy.JobFreshnessDays=30: public /Jobs and home hide jobs older than the cutoff (shifts already require Date>=today) - ListingArchiver flips stale Open→Expired: shifts past their date, jobs older than the cutoff. Runs at startup and on every IngestionWorker cycle (independent of ingestion being enabled) - Verified: backdated job dropped off /Jobs (6→5) and was archived to Expired on the sweep Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,10 @@ public class IngestionWorker : BackgroundService
|
||||
try
|
||||
{
|
||||
using var scope = _scopes.CreateScope();
|
||||
|
||||
// Always archive stale listings (independent of ingestion being on).
|
||||
await scope.ServiceProvider.GetRequiredService<ListingArchiver>().ArchiveStaleAsync(stoppingToken);
|
||||
|
||||
var settings = await scope.ServiceProvider
|
||||
.GetRequiredService<SettingsService>().GetAsync();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user