mirror of
https://wget.la/https://github.com/leookun/cursor-byok
synced 2026-10-05 04:07:36 +08:00
feat: implement web cache for persisting and serving fetched content
- Introduced a new `WebCache` module to manage web content caching. - Added functionality to store fetched content and serve it via a dedicated route. - Integrated web cache into the search module for improved content retrieval. - Implemented database migration management with detailed diagnostics for better error handling during startup. - Updated the SQLite store to utilize the new migration system for enhanced database management.
This commit is contained in:
@@ -19,7 +19,7 @@ use cursor_server::{
|
||||
use prost::Message;
|
||||
|
||||
#[tokio::test]
|
||||
async fn applied_revision_schema_upgrades_to_checkpoints_without_losing_rows() {
|
||||
async fn v0_1_5_beta_1_schema_upgrades_to_checkpoints_without_losing_rows() {
|
||||
use std::borrow::Cow;
|
||||
|
||||
use sqlx::{
|
||||
@@ -42,11 +42,12 @@ async fn applied_revision_schema_upgrades_to_checkpoints_without_losing_rows() {
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
let previous = Migrator {
|
||||
migrations: Cow::Owned(ALL_MIGRATIONS.iter().take(5).cloned().collect()),
|
||||
// v0.1.5-beta.1 shipped migrations 0001 through 0004.
|
||||
let v0_1_5_beta_1 = Migrator {
|
||||
migrations: Cow::Owned(ALL_MIGRATIONS.iter().take(4).cloned().collect()),
|
||||
..Migrator::DEFAULT
|
||||
};
|
||||
previous.run(&pool).await.unwrap();
|
||||
v0_1_5_beta_1.run(&pool).await.unwrap();
|
||||
|
||||
sqlx::query(
|
||||
"INSERT INTO conversations(conversation_id, updated_at_ms)
|
||||
|
||||
Reference in New Issue
Block a user