Compare commits

...

4 Commits

3 changed files with 9 additions and 9 deletions

View File

@@ -126,7 +126,7 @@ impl EventHandler for Handler {
}
}
EventContext::VoiceTick(voice_tick) => {
tracing::error!(?voice_tick);
tracing::debug!(?voice_tick);
for (ssrc, voice_data) in &voice_tick.speaking {
let user_id = self.known_ssrcs.lock().unwrap().get_left_for(ssrc).cloned();
@@ -158,7 +158,6 @@ impl EventHandler for Handler {
let elapsed = elapsed.try_into().expect("TODO");
let now_utc = self.start_utc.checked_add(elapsed).expect("TODO");
tracing::error!(?now_utc, "TODO");
let year = now_utc.year();
let month = now_utc.month();

View File

@@ -399,11 +399,10 @@ async fn main() -> Result<(), MainError> {
});
}
let run_shards = JoinSet::from_iter(
shards
.into_iter()
.map(|shard| handle_events(command_router.clone(), state.clone(), shard)),
);
let run_shards = shards
.into_iter()
.map(|shard| handle_events(command_router.clone(), state.clone(), shard));
let run_shards = JoinSet::from_iter(run_shards);
let run_shards = run_shards.join_all();
tokio::pin!(run_shards);

View File

@@ -1,10 +1,10 @@
use std::{fmt::Debug, str::FromStr};
use std::{fmt::Debug, str::FromStr, sync::Arc};
use opendal::{IntoOperatorUri, Operator, OperatorUri};
#[derive(Clone)]
pub struct Storage {
uri: OperatorUri,
uri: Arc<OperatorUri>,
operator: Operator,
}
@@ -14,6 +14,8 @@ impl FromStr for Storage {
fn from_str(s: &str) -> Result<Self, Self::Err> {
let uri = s.into_operator_uri()?;
let operator = Operator::from_uri(&uri)?;
let uri = uri.into();
Ok(Self { uri, operator })
}