mirror of
https://github.com/openai/codex.git
synced 2026-11-28 23:34:06 +00:00
Add durable per-thread user submission queues (#36952)
## 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
This commit is contained in:
1 parent
449f099f1c
commit
b87981a510
14 files changed
+585
-2
No files matched your search
@@ -7,6 +7,7 @@ pub(crate) static STATE_MIGRATOR: Migrator = sqlx::migrate!("./migrations");
|
||||
pub(crate) static LOGS_MIGRATOR: Migrator = sqlx::migrate!("./logs_migrations");
|
||||
pub(crate) static GOALS_MIGRATOR: Migrator = sqlx::migrate!("./goals_migrations");
|
||||
pub(crate) static MEMORIES_MIGRATOR: Migrator = sqlx::migrate!("./memory_migrations");
|
||||
pub(crate) static QUEUE_MIGRATOR: Migrator = sqlx::migrate!("./queue_migrations");
|
||||
pub(crate) static THREAD_HISTORY_MIGRATOR: Migrator = sqlx::migrate!("./thread_history_migrations");
|
||||
|
||||
/// Allow an older Codex binary to open a database that has already been
|
||||
@@ -42,6 +43,10 @@ pub(crate) fn runtime_memories_migrator() -> Migrator {
|
||||
runtime_migrator(&MEMORIES_MIGRATOR)
|
||||
}
|
||||
|
||||
pub(crate) fn runtime_queue_migrator() -> Migrator {
|
||||
runtime_migrator(&QUEUE_MIGRATOR)
|
||||
}
|
||||
|
||||
// The paginated history projector will call this when it takes ownership of opening the database.
|
||||
#[allow(dead_code)]
|
||||
pub(crate) fn runtime_thread_history_migrator() -> Migrator {
|
||||
|
||||
Reference in new issue
Block a user