mirror of
https://github.com/openai/codex.git
synced 2026-08-23 13:09:46 +00:00
## What changed - Add a storage-neutral `QueueStore` interface backed by a dedicated SQLite database for ordered, thread-scoped user submissions. - Support enqueueing, paginated listing, editing, deletion, and atomic reordering, with a limit of 100 pending items per thread. - Remove queued submissions when their thread is deleted. ## Testing - Cover concurrent inserts, ordering and pagination, edits, deletion, cross-thread isolation, queue limits, and thread cleanup. GitOrigin-RevId: 0a8e95ac71137afc6f3a039d4b5fc8603110c891
12 lines
327 B
SQL
12 lines
327 B
SQL
CREATE TABLE queued_items (
|
|
id TEXT PRIMARY KEY NOT NULL,
|
|
thread_id TEXT NOT NULL,
|
|
payload_json TEXT NOT NULL,
|
|
queue_order INTEGER NOT NULL,
|
|
created_at_ms INTEGER NOT NULL,
|
|
updated_at_ms INTEGER NOT NULL
|
|
);
|
|
|
|
CREATE UNIQUE INDEX queued_items_thread_order_idx
|
|
ON queued_items(thread_id, queue_order);
|