[Ingest] Persistent crawl run-log + per-source breakdown on admin queue
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:
@@ -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; }
|
||||
}
|
||||
Reference in New Issue
Block a user