threadnig fix
This commit is contained in:
parent
6df61c304b
commit
d229e5ee54
19
src/main.rs
19
src/main.rs
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue