diff --git a/pipeline/01_cc_index/schema.sql b/pipeline/01_cc_index/schema.sql index 5609628..154e521 100644 --- a/pipeline/01_cc_index/schema.sql +++ b/pipeline/01_cc_index/schema.sql @@ -30,7 +30,8 @@ CREATE TABLE IF NOT EXISTS icons ( file_size INT, s3_key TEXT, scan_state TEXT DEFAULT 'unscanned', - error TEXT + error TEXT, + downloaded_at TIMESTAMPTZ ); -- Partial index: only unscanned icons (shrinks as work completes) diff --git a/pipeline/03_icon_download/db.go b/pipeline/03_icon_download/db.go index 12a56c7..d5ec91d 100644 --- a/pipeline/03_icon_download/db.go +++ b/pipeline/03_icon_download/db.go @@ -69,7 +69,8 @@ func updateIcon(ctx context.Context, pool *pgxpool.Pool, iconID int64, result Do content_type = $2, width = $3, height = $4, - file_size = $5 + file_size = $5, + downloaded_at = now() WHERE id = $6`, result.S3Key, result.ContentType, nilIntIf(result.Width, 0), nilIntIf(result.Height, 0),