diff --git a/Cargo.toml b/Cargo.toml index a06502a..c94e07e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,8 +8,8 @@ name = "openbook_candles" path = "src/lib.rs" [[bin]] -name = "creator" -path = "src/candle_creation/main.rs" +name = "worker" +path = "src/worker/main.rs" [[bin]] name = "server" diff --git a/src/lib.rs b/src/lib.rs index 04fe6a5..768631b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,4 @@ -pub mod candle_creation; +pub mod worker; pub mod database; pub mod structs; pub mod utils; diff --git a/src/candle_creation/candle_batching/higher_order_candles.rs b/src/worker/candle_batching/higher_order_candles.rs similarity index 100% rename from src/candle_creation/candle_batching/higher_order_candles.rs rename to src/worker/candle_batching/higher_order_candles.rs diff --git a/src/candle_creation/candle_batching/minute_candles.rs b/src/worker/candle_batching/minute_candles.rs similarity index 100% rename from src/candle_creation/candle_batching/minute_candles.rs rename to src/worker/candle_batching/minute_candles.rs diff --git a/src/candle_creation/candle_batching/mod.rs b/src/worker/candle_batching/mod.rs similarity index 96% rename from src/candle_creation/candle_batching/mod.rs rename to src/worker/candle_batching/mod.rs index bf535d6..150f2b9 100644 --- a/src/candle_creation/candle_batching/mod.rs +++ b/src/worker/candle_batching/mod.rs @@ -7,7 +7,7 @@ use strum::IntoEnumIterator; use tokio::{sync::mpsc::Sender, time::sleep}; use crate::{ - candle_creation::candle_batching::minute_candles::batch_1m_candles, + worker::candle_batching::minute_candles::batch_1m_candles, structs::{candle::Candle, markets::MarketInfo, resolution::Resolution}, }; diff --git a/src/candle_creation/main.rs b/src/worker/main.rs similarity index 94% rename from src/candle_creation/main.rs rename to src/worker/main.rs index b31f871..d4605b0 100644 --- a/src/candle_creation/main.rs +++ b/src/worker/main.rs @@ -1,6 +1,6 @@ use dotenv; -use openbook_candles::candle_creation::candle_batching::batch_candles; -use openbook_candles::candle_creation::trade_fetching::scrape::scrape; +use openbook_candles::worker::candle_batching::batch_candles; +use openbook_candles::worker::trade_fetching::scrape::scrape; use openbook_candles::database::{ initialize::{connect_to_database, setup_database}, insert::{persist_candles, persist_fill_events}, diff --git a/src/candle_creation/mod.rs b/src/worker/mod.rs similarity index 100% rename from src/candle_creation/mod.rs rename to src/worker/mod.rs diff --git a/src/candle_creation/trade_fetching/mod.rs b/src/worker/trade_fetching/mod.rs similarity index 100% rename from src/candle_creation/trade_fetching/mod.rs rename to src/worker/trade_fetching/mod.rs diff --git a/src/candle_creation/trade_fetching/parsing.rs b/src/worker/trade_fetching/parsing.rs similarity index 100% rename from src/candle_creation/trade_fetching/parsing.rs rename to src/worker/trade_fetching/parsing.rs diff --git a/src/candle_creation/trade_fetching/scrape.rs b/src/worker/trade_fetching/scrape.rs similarity index 100% rename from src/candle_creation/trade_fetching/scrape.rs rename to src/worker/trade_fetching/scrape.rs