Refactored local delivery to avoid mpsc channel
This commit is contained in:
@@ -9,7 +9,7 @@ use std::time::Instant;
|
||||
use common::listener::SessionStream;
|
||||
use directory::Permission;
|
||||
use imap_proto::receiver::Request;
|
||||
use jmap::{changes::write::ChangeLog, sieve::set::SieveScriptSet};
|
||||
use jmap::sieve::set::SieveScriptSet;
|
||||
use jmap_proto::types::collection::Collection;
|
||||
use store::write::log::ChangeLogBuilder;
|
||||
use trc::AddContext;
|
||||
|
||||
@@ -9,7 +9,7 @@ use std::time::Instant;
|
||||
use common::listener::SessionStream;
|
||||
use directory::Permission;
|
||||
use imap_proto::receiver::Request;
|
||||
use jmap::{blob::download::BlobDownload, sieve::set::ObjectBlobId, JmapMethods};
|
||||
use jmap::{blob::download::BlobDownload, sieve::set::ObjectBlobId};
|
||||
use jmap_proto::{
|
||||
object::Object,
|
||||
types::{collection::Collection, property::Property, value::Value},
|
||||
|
||||
@@ -9,7 +9,6 @@ use std::time::Instant;
|
||||
use common::listener::SessionStream;
|
||||
use directory::Permission;
|
||||
use imap_proto::receiver::Request;
|
||||
use jmap::JmapMethods;
|
||||
use trc::AddContext;
|
||||
|
||||
use crate::core::{Command, ResponseCode, Session, StatusResponse};
|
||||
|
||||
@@ -8,7 +8,6 @@ use std::time::Instant;
|
||||
|
||||
use common::listener::SessionStream;
|
||||
use directory::Permission;
|
||||
use jmap::JmapMethods;
|
||||
use jmap_proto::{
|
||||
object::Object,
|
||||
types::{collection::Collection, property::Property, value::Value},
|
||||
|
||||
@@ -10,7 +10,6 @@ use common::listener::SessionStream;
|
||||
use directory::Permission;
|
||||
use imap_proto::receiver::Request;
|
||||
use jmap::{
|
||||
blob::upload::BlobUpload,
|
||||
sieve::set::{ObjectBlobId, SCHEMA},
|
||||
JmapMethods,
|
||||
};
|
||||
@@ -188,7 +187,8 @@ impl<T: SessionStream> Session<T> {
|
||||
),
|
||||
);
|
||||
self.server
|
||||
.write_batch(batch)
|
||||
.store()
|
||||
.write(batch)
|
||||
.await
|
||||
.caused_by(trc::location!())?;
|
||||
|
||||
@@ -248,7 +248,8 @@ impl<T: SessionStream> Session<T> {
|
||||
|
||||
let assigned_ids = self
|
||||
.server
|
||||
.write_batch(batch)
|
||||
.store()
|
||||
.write(batch)
|
||||
.await
|
||||
.caused_by(trc::location!())?;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ use std::time::Instant;
|
||||
use common::listener::SessionStream;
|
||||
use directory::Permission;
|
||||
use imap_proto::receiver::Request;
|
||||
use jmap::{changes::write::ChangeLog, sieve::set::SCHEMA, JmapMethods};
|
||||
use jmap::sieve::set::SCHEMA;
|
||||
use jmap_proto::{
|
||||
object::{index::ObjectIndexBuilder, Object},
|
||||
types::{collection::Collection, property::Property, value::Value},
|
||||
@@ -93,7 +93,8 @@ impl<T: SessionStream> Session<T> {
|
||||
);
|
||||
if !batch.is_empty() {
|
||||
self.server
|
||||
.write_batch(batch)
|
||||
.store()
|
||||
.write(batch)
|
||||
.await
|
||||
.caused_by(trc::location!())?;
|
||||
let mut changelog = ChangeLogBuilder::new();
|
||||
|
||||
@@ -9,7 +9,7 @@ use std::time::Instant;
|
||||
use common::listener::SessionStream;
|
||||
use directory::Permission;
|
||||
use imap_proto::receiver::Request;
|
||||
use jmap::{changes::write::ChangeLog, sieve::set::SieveScriptSet};
|
||||
use jmap::sieve::set::SieveScriptSet;
|
||||
use jmap_proto::types::collection::Collection;
|
||||
use store::write::log::ChangeLogBuilder;
|
||||
use trc::AddContext;
|
||||
|
||||
Reference in New Issue
Block a user