Repository navigation
docs: redesign README in the goptics house style, add a logo - #18
Merged
Merged
Conversation
Queue.EnqueueOnce(item, id) and PriorityQueue.EnqueueOnce(item, priority, id) implement varmq's IDedupQueue and IDedupPriorityQueue. Opening a table adds a job_id TEXT column when it is missing and a unique partial index on it over the rows that have one. The insert ends in ON CONFLICT (job_id) WHERE job_id IS NOT NULL DO NOTHING, so a repeat stores nothing and returns true, while a NOT NULL failure such as Enqueue(nil) still fails. Enqueue and an empty id bind NULL. The index is <name>__sqliteq_job_id rather than <name>_job_id, for the reason the pending index has its suffix: tables and indexes share one namespace, and a queue named orders_job_id could not open beside orders.
A short EnqueueOnce section: a repeat stores nothing and returns true, and the id is remembered while its row exists (pending, processing, or completed with WithRemoveOnComplete(false)). The Compatibility line now says batch pops and EnqueueOnce need varmq v1.10.0 or later, and the schema list names job_id.
A nil option panicked in New, in the registry's option loop and in newQueue. All three now return one error, so New, NewQueue and NewPriorityQueue never panic on it; a rejected call creates no folder, file or table. Two tests pin the EnqueueOnce id: a job claimed and never acked keeps its id through the requeue on the next open, so a repeat stores nothing and the job runs once; Purge frees the ids of pending and processing rows. README: any name SQLite accepts as a table name under WithSingleFile, the same handle only while it is open, the single-file layout does not create its folder, batch claims only for a worker whose sole source is the sqliteq queue, a Durability section for WAL with synchronous=NORMAL, and the Windows device names as queue names in the folder layout.
A text logo in light and dark variants, built like redisq's: three stacked queue bars and the wordmark, in SQLite blue. The README follows redisq's layout: logo, badges, tagline and section links, then features, installation (Go 1.24+ and cgo), quick start, usage, storage, configuration, delivery guarantees, upgrading from v0.2, how it works, development, contributing and license. New sections: a delivery guarantees table; an upgrade list (the path is a plain path, not a DSN; one shared handle per open name; recovery once per file open, which replaces RequeueNoAckRows); an option table. The CI badge now links the sqliteq.yml workflow. The column list gains ack and priority, and the single-file name rules note the index names. The measured WAL sizes are left out until the benchmark they come from is published; the computed sizes stay.
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.
Stacked on #16 (
feat/enqueue-once). README only: no code changes.What changes
assets/text-logo.svgandtext-logo-dark.svg, built like redisq's (three stacked queue bars and the wordmark) in SQLite blue. The README picks the light or dark version with<picture>.CGO_ENABLED=1and a C compiler).RequeueNoAckRows.sqliteq.ymlworkflow; it pointed atgo.yml, which doesn't exist.ackandpriority;__sqliteq_*index names;Checked
Every claim was checked against the code, with probes where reading wasn't enough. Every Go snippet was compiled and run, including the varmq one against varmq
main. Links and anchors were checked against GitHub's heading rules.