Hide + archive stale listings (old jobs, expired shifts)
CI/CD / CI · dotnet build (push) Successful in 37s
CI/CD / Deploy · hamkadr (push) Successful in 48s

- 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:
soroush.asadi
2026-06-04 09:57:06 +03:30
parent 178e44c4da
commit 6d2ad6f87e
5 changed files with 62 additions and 2 deletions
@@ -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();