Repository navigation
feat: Reject for varmq IAcknowledgeable - #21
Merged
Merged
Conversation
Reject(ackID, reason) finishes a processing item that failed for good: deleted like an ack, or with WithRemoveOnComplete(false) kept with status 'failed'. Same group commit as Acknowledge via a shared finish. Reason is not stored (no column). Required since varmq#173.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reject(ackID, reason)onQueueandPriorityQueue, so sqliteq satisfies varmq'sIAcknowledgeable(goptics/varmq#173: failed jobs callReject, notAcknowledge).Acknowledge(ackID) -> finish(ackID, q.ack) +Reject(ackID, reason) -> finish(ackID, q.reject) removeOnComplete (default) -> DELETE row # same as ack WithRemoveOnComplete(false) -> status 'failed' # ack keeps 'completed'finishpath for both: same ack-ID parse, group commit, one prepared statement each.reasonnot stored: would need a schema migration.failedrow still blocksEnqueueOnceof the same ID, like acompletedrow.Evidence
reject_test.go:WithRemoveOnComplete(false): onecompleted+ onefailedrow, neither requeuedgo test -race ./...passes, 91.3% coverage;Reject,Acknowledgeat 100%.examples/sqlite-persistentvets against this branch.Merge Danger
Door: two-way
New method only;
Acknowledgebehavior unchanged.Blast Radius: sqliteq API
WithRemoveOnComplete(false)now readfailed, notcompleted; anything countingcompletedrows sees fewer.