mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
feat(core): new worker workspace engine (#9257)
This commit is contained in:
@@ -437,14 +437,14 @@ impl DocStoragePool {
|
||||
universal_id: String,
|
||||
peer: String,
|
||||
doc_id: String,
|
||||
) -> Result<DocClock> {
|
||||
) -> Result<Option<DocClock>> {
|
||||
Ok(
|
||||
self
|
||||
.inner
|
||||
.ensure_storage(universal_id)?
|
||||
.get_peer_remote_clock(peer, doc_id)
|
||||
.await?
|
||||
.into(),
|
||||
.map(Into::into),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -492,14 +492,14 @@ impl DocStoragePool {
|
||||
universal_id: String,
|
||||
peer: String,
|
||||
doc_id: String,
|
||||
) -> Result<DocClock> {
|
||||
) -> Result<Option<DocClock>> {
|
||||
Ok(
|
||||
self
|
||||
.inner
|
||||
.ensure_storage(universal_id)?
|
||||
.get_peer_pulled_remote_clock(peer, doc_id)
|
||||
.await?
|
||||
.into(),
|
||||
.map(Into::into),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -525,6 +525,22 @@ impl DocStoragePool {
|
||||
)
|
||||
}
|
||||
|
||||
pub async fn get_peer_pushed_clock(
|
||||
&self,
|
||||
universal_id: String,
|
||||
peer: String,
|
||||
doc_id: String,
|
||||
) -> Result<Option<DocClock>> {
|
||||
Ok(
|
||||
self
|
||||
.inner
|
||||
.ensure_storage(universal_id)?
|
||||
.get_peer_pushed_clock(peer, doc_id)
|
||||
.await?
|
||||
.map(Into::into),
|
||||
)
|
||||
}
|
||||
|
||||
pub async fn get_peer_pushed_clocks(
|
||||
&self,
|
||||
universal_id: String,
|
||||
|
||||
Reference in New Issue
Block a user