threadnig fix

This commit is contained in:
Suguivy 2023-03-05 23:55:06 +01:00
parent 6df61c304b
commit d229e5ee54
1 changed files with 13 additions and 6 deletions

View File

@ -103,39 +103,46 @@ fn verify_mode() {
}
fn pull() {
Command::new("scp")
let mut c1 = Command::new("scp")
.arg("bot:/home/bot/sleepinggaysbot/urls.csv")
.arg("verified.csv")
.spawn()
.expect("open command failed to start");
Command::new("scp")
let mut c2 = Command::new("scp")
.arg("bot:/home/bot/sleepinggaysbot/rejected.csv")
.arg("rejected.csv")
.spawn()
.expect("open command failed to start");
Command::new("scp")
let mut c3 = Command::new("scp")
.arg("bot:/home/bot/sleepinggaysbot/pending.csv")
.arg("pending.csv")
.spawn()
.expect("open command failed to start");
c1.wait().unwrap();
c2.wait().unwrap();
c3.wait().unwrap();
}
fn push() {
Command::new("scp")
let mut c1 = Command::new("scp")
.arg("verified.csv")
.arg("bot:/home/bot/sleepinggaysbot/urls.csv")
.spawn()
.expect("open command failed to start");
Command::new("scp")
let mut c2 = Command::new("scp")
.arg("rejected.csv")
.arg("bot:/home/bot/sleepinggaysbot/rejected.csv")
.spawn()
.expect("open command failed to start");
Command::new("scp")
let mut c3 = Command::new("scp")
.arg("pending.csv")
.arg("bot:/home/bot/sleepinggaysbot/pending.csv")
.spawn()
.expect("open command failed to start");
c1.wait().unwrap();
c2.wait().unwrap();
c3.wait().unwrap();
}
fn input_parse(image_uri: &str) -> bool {