removing debugging

This commit is contained in:
Alek Westover
2023-06-21 10:45:37 -04:00
parent 32c03bc784
commit bb414e5a0a
8 changed files with 10 additions and 23 deletions

View File

@@ -60,9 +60,6 @@ use tokio::runtime::Runtime;
fn main() -> Result<()> {
init_tracing_and_logging(DEFAULT_LOG_LEVEL)?;
let args: Vec<String> = std::env::args().collect();
std::fs::write("alek/ARG", args.join(" "))?;
let matches = cli().get_matches();
let remote_ext_config = matches
@@ -81,8 +78,6 @@ fn main() -> Result<()> {
Value::String(x) => x,
_ => panic!("oops"),
};
warn!("you certainly must build changes if you want rust changes to be built");
std::fs::write("alek/yay", remote_ext_bucket.clone())?;
let rt = Runtime::new().unwrap();
rt.block_on(async move {
@@ -213,7 +208,7 @@ fn main() -> Result<()> {
live_config_allowed,
state: Mutex::new(new_state),
state_changed: Condvar::new(),
remote_ext_bucket: remote_ext_bucket.clone(), // TODO ALEK: pass all the args!
remote_ext_bucket: remote_ext_bucket.clone(), // TODO: pass more configurations?
remote_ext_region: remote_ext_region.clone(),
remote_ext_endpoint: remote_ext_endpoint.clone(),
};

View File

@@ -46,7 +46,7 @@ pub struct ComputeNode {
/// `Condvar` to allow notifying waiters about state changes.
pub state_changed: Condvar,
// S3 configuration variables:
// TODO: alek pass all args here
// TODO: pass more args here?
pub remote_ext_bucket: String,
pub remote_ext_region: String,
pub remote_ext_endpoint: String,

View File

@@ -137,7 +137,7 @@ async fn routes(req: Request<Body>, compute: &Arc<ComputeNode>) -> Response<Body
match extension_server::download_file(
filename,
// TODO alek: pass more remote_ext arguments
// TODO: pass more remote_ext arguments?
compute.remote_ext_bucket.clone(),
compute.remote_ext_region.clone(),
compute.remote_ext_endpoint.clone(),
@@ -344,10 +344,6 @@ async fn serve(port: u16, state: Arc<ComputeNode>) {
pub fn launch_http_server(port: u16, state: &Arc<ComputeNode>) -> Result<thread::JoinHandle<()>> {
let state = Arc::clone(state);
// TODO: remote print statements
let xxx = format!("ROUTING port: {port}");
std::fs::write("alek/ROUTES", xxx).expect("routing write file");
Ok(thread::Builder::new()
.name("http-endpoint".into())
.spawn(move || serve(port, state))?)