From 29c4b57db9a34e0f815d93cac6a2cae543778a93 Mon Sep 17 00:00:00 2001 From: kboz Date: Fri, 24 Apr 2026 01:11:23 +0200 Subject: build(core): adopt fork and remove experimental rust backend - Added a 2026 copyright statement under the original creator's in `license.md` to properly establish new fork logic. - Updated `readme.md` to explicitly state this repository is a maintained fork. - Eliminated the `rust_backend/` directory, Actix codebase, and its associated launch configurations. - Purged all references specifying a Python/Rust/React tri-split from `AGENTS.md` and the frontend `.instructions.md` configuration. Co-authored-by: Copilot --- rust_backend/src/manager.rs | 90 --------------------------------------------- 1 file changed, 90 deletions(-) delete mode 100644 rust_backend/src/manager.rs (limited to 'rust_backend/src/manager.rs') diff --git a/rust_backend/src/manager.rs b/rust_backend/src/manager.rs deleted file mode 100644 index b9cbe08..0000000 --- a/rust_backend/src/manager.rs +++ /dev/null @@ -1,90 +0,0 @@ -use std::sync::Mutex; -use tokio::sync::watch; - -use std::error::Error; - -use crate::eve_service::EveService; -use crate::pathfinding::{Location, build}; -use crate::market::{Order, Orders}; - -pub struct Manager { - // route_state: Mutex - // route_info_state: Mutex - orders_state: Mutex, - location: Mutex>, - // log_state: Mutex - eve_service: EveService, - -} - -impl Manager { - pub fn new() -> Manager { - - build(); - - Manager { - location: Mutex::new( None ), - eve_service: EveService::new().expect("Manager to generate EveService"), - orders_state: Mutex::new( Orders::new() ), - } - - } - - pub async fn run(&self, shutdown_signal: watch::Receiver) { - loop { - tokio::time::sleep(tokio::time::Duration::from_secs(10)).await; - if *shutdown_signal.borrow() { - println!("Manager task is shutting down."); - break; - } - - match self.eve_service.location().await { - Ok(result) => { - match self.location.lock() { - Ok(mut location) => *location = Some(result), - Err(e) => eprintln!("Error locking location mutex: {}", e), - } - } - Err(e) => { - eprintln!("Error fetching location {}", e); - } - } - - - let orders_clone = match self.orders_state.lock() { - Ok(orders_lock) => orders_lock.clone(), - Err(e) => { - eprintln!("Error locking orders_state mutex: {}", e); - continue; - } - }; - - match self.eve_service.updated_orders(&orders_clone).await { - Ok(updated_orders) => { - match self.orders_state.lock() { - Ok(mut orders_state) => orders_state.update(updated_orders), - Err(e) => eprintln!("Error locking orders_state mutex: {}", e), - } - } - Err(e) => eprintln!("Error updating orders: {}", e), - } - } - } - pub fn get_authorization_url(&self) -> String { - self.eve_service.get_authorization_url() - } - - pub async fn exchange_code_for_token(&self, code: &str) -> Result<(), Box> { - self.eve_service.exchange_code_for_token(code).await - } - - pub fn location(&self) -> Option { - let location = self.location.lock().unwrap(); - location.clone() - } - - pub fn orders(&self) -> Vec { - let orders = self.orders_state.lock().unwrap(); - orders.orders() - } -} \ No newline at end of file -- cgit v1.3