Skip to content

Commit

Permalink
Create uuid in the kactus thread
Browse files Browse the repository at this point in the history
  • Loading branch information
kylerchin committed Mar 20, 2024
1 parent 8b34d48 commit de6a6c9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ dmfr = "0.1.0"
chateau = {git = "https://github.com/catenarytransit/chateau"}
dmfr-folder-reader = {git = "https://github.com/catenarytransit/dmfr-folder-reader"}
tokio-zookeeper = "0.2.1"
uuid = "1.8.0"

[[bin]]
name = "maple"
Expand Down
7 changes: 6 additions & 1 deletion src/kactus/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
use std::thread;
use std::time::Duration;
use uuid::Uuid;

fn main() {
let this_worker_id = Arc::new(Uuid::new_v4());

// infinite runtime with worker threads and a leader-candidate thread that attempts to be the leader
// Uses zookeeper to elect the leader and assign feeds to insert
// Service discovery via zookeeper
Expand All @@ -14,10 +17,12 @@ fn main() {
//spawn the thread to listen to be a leader
thread::spawn(|| {
//read passwords and dynamically update passwords from postgres

let dmfr_result = read_folders("./transitland-atlas/")?;
});

//worker thread
thread::spawn(|| {

})
});
}

0 comments on commit de6a6c9

Please sign in to comment.