[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:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace JobsMedical.Web.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class IngestionRunLog : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "IngestionRuns",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
RunAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
Fetched = table.Column<int>(type: "integer", nullable: false),
|
||||
Queued = table.Column<int>(type: "integer", nullable: false),
|
||||
Published = table.Column<int>(type: "integer", nullable: false),
|
||||
Flagged = table.Column<int>(type: "integer", nullable: false),
|
||||
Spam = table.Column<int>(type: "integer", nullable: false),
|
||||
Duplicates = table.Column<int>(type: "integer", nullable: false),
|
||||
Detail = table.Column<string>(type: "character varying(2000)", maxLength: 2000, nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_IngestionRuns", x => x.Id);
|
||||
});
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "IngestionRuns");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -421,6 +421,44 @@ namespace JobsMedical.Web.Migrations
|
||||
b.ToTable("FacilityDocuments");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("JobsMedical.Web.Models.IngestionRun", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Detail")
|
||||
.HasMaxLength(2000)
|
||||
.HasColumnType("character varying(2000)");
|
||||
|
||||
b.Property<int>("Duplicates")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("Fetched")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("Flagged")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("Published")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("Queued")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<DateTime>("RunAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<int>("Spam")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("IngestionRuns");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("JobsMedical.Web.Models.InterestEvent", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
|
||||
Reference in New Issue
Block a user