FoundationDB changes.

This commit is contained in:
mdecimus
2023-07-07 09:27:22 +02:00
parent fac3273f10
commit 6ba892f7d6
12 changed files with 71 additions and 59 deletions

View File

@@ -38,6 +38,7 @@ use jmap::{
http::{fetch_body, ToHttpResponse},
HtmlResponse, StateChangeResponse,
},
auth::AccessToken,
JMAP,
};
use jmap_client::{client::Client, mailbox::Role, push_subscription::Keys};
@@ -307,7 +308,9 @@ impl utils::listener::SessionManager for SessionManager {
.map_or(false, |encoding| {
encoding.to_str().unwrap() == "aes128gcm"
});
let body = fetch_body(&mut req, 1024 * 1024).await.unwrap();
let body = fetch_body(&mut req, 1024 * 1024, &AccessToken::default())
.await
.unwrap();
let message = serde_json::from_slice::<PushMessage>(&if is_encrypted {
ece::decrypt(
&push.keypair,

View File

@@ -30,16 +30,16 @@ use store::{write::BatchBuilder, Store};
pub async fn test(db: Arc<Store>) {
println!("Running Store ID assignment tests...");
/*store::backend::foundationdb::write::ID_ASSIGNMENT_EXPIRY
.store(2, std::sync::atomic::Ordering::Relaxed);*/
store::backend::foundationdb::write::ID_ASSIGNMENT_EXPIRY
.store(2, std::sync::atomic::Ordering::Relaxed);
test_1(db.clone()).await;
test_2(db.clone()).await;
test_3(db.clone()).await;
test_4(db).await;
/*store::backend::foundationdb::write::ID_ASSIGNMENT_EXPIRY
.store(60 * 60, std::sync::atomic::Ordering::Relaxed);*/
store::backend::foundationdb::write::ID_ASSIGNMENT_EXPIRY
.store(60 * 60, std::sync::atomic::Ordering::Relaxed);
}
async fn test_1(db: Arc<Store>) {

View File

@@ -21,6 +21,7 @@
* for more details.
*/
#[cfg(feature = "foundationdb")]
pub mod assign_id;
pub mod blob;
pub mod query;