Files
pl_mail/migrations
Paul LütznerandClaude Opus 5.5 6f24bfabc3 Write down the Gmail messages an import declines, and stop fetching them again
An import sat at 21,964 of 24,199 and said "waiting" (#90). The 2,235
are messages the batch handler fetches and does not store: its headers
tie the message to no account here (a draft, a chat, mail sent from a
"send mail as" address), or Gmail lists it and answers 404.

Declining left a debug line and nothing else, and the import's only test
for "still to come" is "not stored". So:

  every hourly listing   named all 2,235 again, and each was fetched in
                         full again: 134,100 units of the 360,000 an
                         hour a 6,000 project has
  the import             could only end at BACKFILL_MAX_ATTEMPTS, a day
                         of listings later; the account in the report
                         was on attempt 18
  the progress line      could never reach Google's total, which counts
                         them

gmail_skipped_message records each one when it is declined: the reason,
its labels and its From, To, Cc and Delivered-To.

  newGmailIds()          treats a recorded id like a stored one, so a
                         listing with nothing else outstanding settles
                         at once
  an onlyMissing batch   queued by an earlier listing drops them too
  ImportProgress         counts them as done
  app:gmail:skipped      prints the record by kind, label and address;
                         --forget clears it so the next listing asks
                         again

A row goes when its message is stored after all.

Whether some of these messages ought to be stored is a separate
question and is not touched: the filter decides exactly as before. The
record is what that question can now be answered from.

Migration: one new, empty table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 14:49:22 +02:00
..
2026-07-16 12:59:19 +02:00
2026-07-17 10:34:32 +02:00
2026-07-17 12:47:20 +02:00
2026-07-17 18:19:47 +02:00
2026-07-17 18:19:47 +02:00
2026-07-19 20:38:41 +02:00
2026-07-19 20:38:41 +02:00
2026-07-20 10:56:25 +02:00
2026-07-20 10:56:25 +02:00
2026-07-21 13:40:57 +02:00
2026-07-23 13:53:37 +02:00
2026-07-23 14:17:49 +02:00
2026-07-24 13:56:18 +02:00
2026-07-24 13:56:18 +02:00
2026-07-24 22:26:19 +02:00
2026-07-25 10:47:50 +02:00
2026-07-25 10:47:50 +02:00
2026-07-26 10:58:31 +02:00
2026-07-27 12:15:24 +02:00
2026-07-27 13:10:36 +02:00
2026-07-27 13:10:36 +02:00
2026-07-28 00:26:47 +02:00
2026-07-28 12:33:46 +02:00
2026-07-28 13:37:30 +02:00
2026-07-28 22:25:00 +02:00
2fa
2026-07-31 07:18:26 +02:00