From b6a5e709b7b48b4c691e16ec937e494f99c7492b Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Thu, 2 Apr 2026 11:47:20 -0500 Subject: [PATCH] Show enrichment progress bar with remaining/total contacts --- lib/microwaveprop_web/live/backfill_live.ex | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/microwaveprop_web/live/backfill_live.ex b/lib/microwaveprop_web/live/backfill_live.ex index 9e0f8c23..9f9e6745 100644 --- a/lib/microwaveprop_web/live/backfill_live.ex +++ b/lib/microwaveprop_web/live/backfill_live.ex @@ -18,6 +18,7 @@ defmodule MicrowavepropWeb.BackfillLive do stats = fetch_stats() unprocessed = count_unprocessed() + total_contacts = Repo.aggregate(from(c in Contact, where: not is_nil(c.pos1)), :count) {:ok, assign(socket, @@ -25,6 +26,7 @@ defmodule MicrowavepropWeb.BackfillLive do limit: 500, stats: stats, unprocessed: unprocessed, + total_contacts: total_contacts, last_enqueued: nil, enqueuing: false )} @@ -145,8 +147,16 @@ defmodule MicrowavepropWeb.BackfillLive do
-
Contacts Needing Enrichment
-
{@unprocessed}
+
Enrichment Progress
+
{@unprocessed} remaining
+
+ {@total_contacts - @unprocessed} / {@total_contacts} complete +
+
Active/Queued Jobs