[Ingest] Persistent crawl run-log + per-source breakdown on admin queue
CI/CD / CI · dotnet build (push) Has been cancelled
CI/CD / Deploy · hamkadr (push) Has been cancelled

Each ingestion run now records an IngestionRun row (found/queued/published/flagged/spam/duplicates + a per-source detail string). Admin → صف آگهی‌ها shows a «تاریخچه جمع‌آوری» table of the last 15 runs (hover a row for the per-source breakdown), so admins can see how much each source found vs added over time. IngestionSummary gains TotalFetched. Migration: IngestionRuns table.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-08 06:23:58 +03:30
parent 524c66e25e
commit 487c7ca82f
8 changed files with 1525 additions and 1 deletions
@@ -0,0 +1,21 @@
using System.ComponentModel.DataAnnotations;
namespace JobsMedical.Web.Models;
/// <summary>One ingestion run's outcome — kept so admins see a history of what was crawled,
/// how much was found, queued, published, flagged, etc. (with a per-source breakdown).</summary>
public class IngestionRun
{
public int Id { get; set; }
public DateTime RunAt { get; set; } = DateTime.UtcNow;
public int Fetched { get; set; } // total items pulled from all sources
public int Queued { get; set; } // sent to the review queue
public int Published { get; set; } // auto-published
public int Flagged { get; set; } // needs-review
public int Spam { get; set; } // discarded as spam/irrelevant
public int Duplicates { get; set; } // skipped (already seen)
/// <summary>Human-readable per-source breakdown, e.g. "دیوار: یافت ۱۲…؛ مدجابز: یافت ۴۰…".</summary>
[MaxLength(2000)] public string? Detail { get; set; }
}