From 872e25dac424d51008454ba041eefd6cafa2659b Mon Sep 17 00:00:00 2001 From: Michael Wiencek Date: Wed, 21 Feb 2024 17:19:48 -0600 Subject: [PATCH] Add query for inspecting failures --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index a445b35..ed88678 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,22 @@ musicbrainz_db=> INSERT INTO artwork_indexer.event_queue (entity_type, action, m INSERT 0 1 ``` +### Inspecting failures + +To retrieve all current failed events, run: + +```sh +musicbrainz_db=> SELECT q.*, string_agg(fr.failure_reason, E'\n') + FROM artwork_indexer.event_queue q + JOIN artwork_indexer.event_failure_reason fr ON fr.event = q.id + WHERE q.state = 'failed' + GROUP BY q.id + ORDER BY q.last_updated DESC; +``` + +These must be cleaned up by hand once they're no longer needed (i.e., after +the underlying issue is determined and resolved). + ## Hacking There are two primary tasks of the artwork-indexer: