Delete stale rooms/participants after RECONNECT_TIMEOUT

This commit is contained in:
Antonio Scandurra 2022-12-13 11:32:37 +01:00
parent beea9b68ff
commit 6a6a032f1f
7 changed files with 588 additions and 171 deletions

View file

@ -1,6 +1,6 @@
use anyhow::anyhow;
use axum::{routing::get, Router};
use collab::{db, env, AppState, Config, MigrateConfig, Result};
use collab::{db, env, executor::Executor, AppState, Config, MigrateConfig, Result};
use db::Database;
use std::{
env::args,
@ -56,7 +56,7 @@ async fn main() -> Result<()> {
let listener = TcpListener::bind(&format!("0.0.0.0:{}", state.config.http_port))
.expect("failed to bind TCP listener");
let rpc_server = collab::rpc::Server::new(state.clone());
let rpc_server = collab::rpc::Server::new(state.clone(), Executor::Production);
rpc_server.start().await?;
let app = collab::api::routes(rpc_server.clone(), state.clone())