Skip to content

Conversation

@Raveline
Copy link
Contributor

WIP

@Raveline Raveline force-pushed the reenqueue-unparseable-jobs-take-2 branch 2 times, most recently from 720e374 to fdc55bf Compare January 14, 2026 15:48
@Raveline Raveline force-pushed the reenqueue-unparseable-jobs-take-2 branch from fdc55bf to e53381c Compare January 14, 2026 17:09
@Raveline
Copy link
Contributor Author

All right, this version works for a wrong query in the consumers. Here is an example by adding a non existing column:

  "error": "DBException {dbeQueryContext = SQL \"UPDATE chargebee_tasks SET   reserved_by = <16> , attempts = CASE     WHEN finished_at IS NULL THEN attempts + 1     ELSE 1   END WHERE id = ANY( <Array1 []> ) RETURNING id, event, attempts, surprise_surprise\", dbeBackendPid = 500778, dbeError = DetailedQueryError {qeSeverity = \"ERROR\", qeErrorCode = UndefinedColumn, qeMessagePrimary = \"column \\\"surprise_surprise\\\" does not exist\", qeMessageDetail = Nothing, qeMessageHint = Nothing, qeStatementPosition = Just 181, qeInternalPosition = Nothing, qeInternalQuery = Nothing, qeContext = Nothing, qeSourceFile = Just \"parse_relation.c\", qeSourceLine = Just 3651, qeSourceFunction = Just \"errorMissingColumn\"}, dbeCallStack = [(\"runPreparedSQL\",SrcLoc {srcLocPackage = \"consumers-2.3.4.0-83af746950b8f91e9e93ca91ee357d2eb6bad519fa73eb8edc6643cfa528cbf7\", srcLocModule = \"Database.PostgreSQL.Consumers.Components\", srcLocFile = \"src/Database/PostgreSQL/Consumers/Components.hs\", srcLocStartLine = 387, srcLocStartCol = 17, srcLocEndLine = 387, srcLocEndCol = 31})]}",

Though technically, in its current state, it says it will reenqueue tasks even if there are no tasks (and the error will pop every so often, but that's ok: it's pretty bad to have a query that fails even when there are no actual jobs to run), so I suspect we need two different handle.

@Raveline Raveline force-pushed the reenqueue-unparseable-jobs-take-2 branch from 1006cf5 to 0d15769 Compare January 15, 2026 11:28
@Raveline
Copy link
Contributor Author

Latest commit also guarantees it doesn't fail when a single job fails to parse (without blocking the others). However, the update logic doesn't seem to work yet for some reason :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants