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:
@@ -50,7 +50,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)
|
||||
.OrderByDescending(j => j.CreatedAt)
|
||||
.Take(3)
|
||||
.ToListAsync();
|
||||
|
||||
Reference in New Issue
Block a user