Skip to content

Commit

Permalink
chore: remove temporary hardcoded websocat to discord PoC
Browse files Browse the repository at this point in the history
  • Loading branch information
cablehead committed Aug 25, 2024
1 parent 90e0022 commit 27a2527
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 106 deletions.
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ pub mod error;
pub mod http;
pub mod listener;
pub mod nu;
pub mod spawn;
pub mod store;
pub mod tasks;
pub mod thread_pool;
Expand Down
17 changes: 0 additions & 17 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::path::PathBuf;
use std::time::Duration;

use clap::Parser;

Expand All @@ -16,11 +15,6 @@ struct Args {
/// Enables a HTTP endpoint. Address to listen on [HOST]:PORT or <PATH> for Unix domain socket
#[clap(long, value_parser, value_name = "LISTEN_ADDR")]
http: Option<String>,

/// Enable discord websocket (temporary, you'll be able spawn arbitrary CLI commands at runtime
/// in the future)
#[clap(long)]
ws: bool,
}

#[tokio::main]
Expand Down Expand Up @@ -54,17 +48,6 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
});
}

if args.ws {
let store = store.clone();
tokio::spawn(async move {
loop {
let store = store.clone();
let _ = xs::spawn::spawn(store).await;
tokio::time::sleep(Duration::from_millis(1000)).await;
}
});
}

// TODO: graceful shutdown
xs::api::serve(store, engine.clone()).await?;
pool.wait_for_completion();
Expand Down
88 changes: 0 additions & 88 deletions src/spawn.rs

This file was deleted.

0 comments on commit 27a2527

Please sign in to comment.