Compare commits
4 Commits
cfa81784b7
...
c53a3620f2
| Author | SHA1 | Date | |
|---|---|---|---|
| c53a3620f2 | |||
| 491159224d | |||
| 9b1e263312 | |||
| 52adf9ec4c |
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user