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
@@ -39,7 +39,8 @@ public class IndexModel : PageModel
.Include(j => j.Facility).ThenInclude(f => f.City)
.Include(j => j.Facility).ThenInclude(f => f.District)
.Include(j => j.Role)
.Where(j => j.Status == ShiftStatus.Open);
.Where(j => j.Status == ShiftStatus.Open
&& j.CreatedAt >= JobsMedical.Web.Services.Scraping.ListingPolicy.JobCutoffUtc);
if (CityId is not null) q = q.Where(j => j.Facility.CityId == CityId);
if (DistrictId is not null) q = q.Where(j => j.Facility.DistrictId == DistrictId);