diff --git a/Cargo.toml b/Cargo.toml index 7b617db..cba371a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ serde = "1.0" arrayvec = "0.7" rand = "0.8" meval = "0.2" -async-circe = { git = "https://git.karx.xyz/circe/async-circe", default-features = false } +async-circe = { git = "https://git.karx.xyz/circe/async-circe" } lazy_static = "1.4" sedregex = "0.2" rusqlite = { version = "0.26", features = ["bundled"] } diff --git a/src/bots/title.rs b/src/bots/title.rs index 45543c7..99c756d 100644 --- a/src/bots/title.rs +++ b/src/bots/title.rs @@ -91,7 +91,7 @@ impl Titlebot { )?; let mut spotify = ClientCredsSpotify::new(spotify_creds); - spotify.request_token().await?; + //spotify.request_token().await?; Ok(Self { url_regex, title_regex, diff --git a/src/main.rs b/src/main.rs index e65fb10..daf2847 100644 --- a/src/main.rs +++ b/src/main.rs @@ -71,7 +71,8 @@ struct ClientConf { spotify_client_secret: String, prefix: String, db_path: Option, - http_listen: Option, + http_listen_db: Option, + http_listen_git: SocketAddr, git_channel: String, } @@ -101,11 +102,11 @@ async fn main() -> anyhow::Result<()> { ); let http_listen = client_config - .http_listen + .http_listen_db .unwrap_or_else(|| SocketAddr::from(([127, 0, 0, 1], 5000))); let (git_tx, git_recv) = channel(512); - bots::git::run(git_tx, http_listen).await?; + tokio::spawn(bots::git::run(git_tx, client_config.http_listen_git)); let config = Config::runtime_config( client_config.channels, @@ -145,7 +146,7 @@ async fn main() -> anyhow::Result<()> { async fn executor(mut state: AppState, http_listen: SocketAddr) -> anyhow::Result<()> { let web_db = state.db.clone(); select! { - r = web_service::run(web_db, http_listen) => r?, + //r = web_service::run(web_db, http_listen) => r?; r = message_loop(&mut state) => r?, _ = terminate_signal() => { tracing::info!("Sending QUIT message"); @@ -169,6 +170,8 @@ async fn message_loop(state: &mut AppState) -> anyhow::Result<()> { if let Some(s) = state.git_recv.recv().await { state.client.privmsg(&state.git_channel, &s).await?; } + + tracing::info!("aaa"); } Ok(()) }