From 43e63d28d266431b91301268cbfc19209e3f02d0 Mon Sep 17 00:00:00 2001 From: Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> Date: Fri, 25 Nov 2022 22:54:09 +0100 Subject: [PATCH] use the query parameter to store the bisection id to allow refreshes --- index.html | 110 ++++++++++++++++++++++++++++++++++++---------------- src/main.rs | 6 +-- 2 files changed, 79 insertions(+), 37 deletions(-) diff --git a/index.html b/index.html index 38a8af3..93abc24 100644 --- a/index.html +++ b/index.html @@ -85,18 +85,45 @@ impl<T> Struct<T> { > diff --git a/src/main.rs b/src/main.rs index daff821..340911e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -22,7 +22,7 @@ use tracing::{error, info, metadata::LevelFilter}; use tracing_subscriber::EnvFilter; use uuid::Uuid; -type SendChannel = Arc>>; +type SendChannel = Arc>>; type Conn = Arc>; #[tokio::main] @@ -37,7 +37,7 @@ async fn main() -> color_eyre::Result<()> { ) .init(); - let (job_queue_send, job_queue_recv) = mpsc::channel(); // FIXME: make this a sync_channel because bounds are cool + let (job_queue_send, job_queue_recv) = mpsc::sync_channel(10); let sqlite_db = env::var("SQLITE_DB").unwrap_or_else(|_| "bisect.sqlite".to_string()); @@ -62,7 +62,7 @@ async fn main() -> color_eyre::Result<()> { std::thread::spawn(|| bisect::bisect_worker(job_queue_recv, worker_conn)); - info!("Starting up server"); + info!("Starting up server on port 4000"); axum::Server::bind(&"0.0.0.0:4000".parse().unwrap()) .serve(app.into_make_service())