chore: post rebase fixes

This commit is contained in:
Bartosz Sypytkowski 2024-08-14 05:26:38 +02:00
parent 66838c47e3
commit f2fa4d7c22
7 changed files with 19 additions and 20 deletions

View File

@ -1,4 +1,3 @@
use crate::{load_env, localhost_client_with_device_id, setup_log};
use std::collections::HashMap;
use std::ops::Deref;
use std::path::{Path, PathBuf};
@ -42,7 +41,7 @@ use shared_entity::dto::workspace_dto::{
use shared_entity::response::AppResponseError;
use crate::user::{generate_unique_registered_user, User};
use crate::{localhost_client_with_device_id, setup_log};
use crate::{load_env, localhost_client_with_device_id, setup_log};
pub struct TestClient {
pub user: User,

View File

@ -2,8 +2,8 @@
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HttpRealtimeMessage {
#[prost(string, tag = "1")]
pub device_id: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "2")]
pub payload: ::prost::alloc::vec::Vec<u8>,
#[prost(string, tag = "1")]
pub device_id: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "2")]
pub payload: ::prost::alloc::vec::Vec<u8>,
}

View File

@ -1,9 +1,8 @@
use collab::core::awareness::AwarenessUpdate;
use serde::{Deserialize, Serialize};
use std::fmt::{Debug, Display, Formatter};
use collab::core::awareness::AwarenessUpdate;
use serde::{Deserialize, Serialize};
use thiserror::Error;
use yrs::updates::decoder::{Decode, Decoder};
use yrs::updates::encoder::{Encode, Encoder};
use yrs::StateVector;
@ -45,7 +44,7 @@ impl Encode for Message {
},
Message::Awareness(update) => {
encoder.write_var(MSG_AWARENESS);
encoder.write_buf(&update.encode_v1())
encoder.write_buf(update.encode_v1())
},
Message::Custom(msg) => {
encoder.write_var(MSG_CUSTOM);

View File

@ -1,5 +1,6 @@
use crate::error::StreamError;
use crate::model::{MessageId, StreamBinary, StreamMessage, StreamMessageByStreamKey};
use std::sync::Arc;
use std::time::Duration;
use chrono::{DateTime, Utc};
use redis::aio::ConnectionManager;
use redis::streams::{
@ -7,12 +8,12 @@ use redis::streams::{
StreamReadOptions,
};
use redis::{pipe, AsyncCommands, ErrorKind, RedisResult};
use std::sync::Arc;
use std::time::Duration;
use tokio_util::sync::CancellationToken;
use tracing::{error, info, trace, warn};
use crate::error::StreamError;
use crate::model::{MessageId, StreamBinary, StreamMessage, StreamMessageByStreamKey};
#[derive(Clone)]
pub struct StreamGroup {
connection_manager: ConnectionManager,
@ -219,14 +220,14 @@ impl StreamGroup {
/// Returns the messages that were not consumed yet. Which means each message is delivered to only
/// one consumer in the group
///
/// $: This symbol is used with the XREAD command to indicate that you want to start reading only
/// `$`: This symbol is used with the XREAD command to indicate that you want to start reading only
/// new messages that arrive in the stream after the read command has been issued. Essentially,
/// it tells Redis to ignore all the messages already in the stream and only listen for new ones.
/// It's particularly useful when you want to start processing messages from the current moment
/// forward and don't need to process historical messages.
///
/// >: This symbol is used with the XREADGROUP command in the context of consumer groups. When a
/// consumer group reads from a stream using >, it tells Redis to deliver only messages that have
/// `>`: This symbol is used with the XREADGROUP command in the context of consumer groups. When a
/// consumer group reads from a stream using `>`, it tells Redis to deliver only messages that have
/// not yet been acknowledged by any consumer in the group. This allows different consumers in the
/// group to read and process different messages concurrently, without receiving messages that have
/// already been processed by another consumer. It's a way to distribute the workload of processing

View File

@ -242,6 +242,7 @@ impl CollabMemCache {
/// A `RedisResult<Option<(i64, Vec<u8>)>>` where:
/// - `i64` is the timestamp of the data.
/// - `Vec<u8>` is the binary data.
///
/// The function returns `Ok(None)` if no data is found for the given `object_id`.
async fn get_data_with_timestamp(
&self,

View File

@ -10,7 +10,7 @@ use collab_entity::CollabType;
use dashmap::DashMap;
use futures_util::{SinkExt, StreamExt};
use tokio::sync::{mpsc, RwLock};
use tracing::{debug, error, event, trace};
use tracing::{error, event, info, trace};
use yrs::updates::decoder::Decode;
use yrs::updates::encoder::Encode;
use yrs::Update;

View File

@ -7,7 +7,6 @@ use collab::preclude::Collab;
use collab_document::document::Document;
use collab_document::error::DocumentError;
use collab_entity::CollabType;
use std::sync::Arc;
use app_error::AppError;
use appflowy_ai_client::client::AppFlowyAIClient;