diff --git a/ee/tabby-db/src/threads.rs b/ee/tabby-db/src/threads.rs index 7bcfd7a4f2a0..5be1ec75f1bb 100644 --- a/ee/tabby-db/src/threads.rs +++ b/ee/tabby-db/src/threads.rs @@ -340,7 +340,7 @@ impl DbConn { } pub async fn delete_expired_ephemeral_threads(&self) -> Result { - let time = (Utc::now() - Duration::hours(4)).as_sqlite_datetime(); + let time = (Utc::now() - Duration::days(7)).as_sqlite_datetime(); let res = query!( r#" @@ -397,8 +397,8 @@ mod tests { let _ephemeral_thread_id = db.create_thread(user_id, true).await.unwrap(); let non_ephemeral_thread_id = db.create_thread(user_id, false).await.unwrap(); - // Update the updated_at time to be 8 hours ago for all threads - sqlx::query!("UPDATE threads SET updated_at = DATETIME('now', '-8 hours')",) + // Update the updated_at time to be 8 days ago for all threads + sqlx::query!("UPDATE threads SET updated_at = DATETIME('now', '-8 days')",) .execute(&db.pool) .await .unwrap();