Radish alpha
r
Radicle CI broker
Radicle
Git (anonymous pull)
Log in to clone via SSH
chore: drop unused dummy-adapter.rs
Lars Wirzenius committed 2 years ago
commit e43dfc9a980b937a4f099c57f125fe0f7950447e
parent a6da02f8521ad831b47b56275531233ff0343769
1 file changed +0 -22
deleted src/bin/dummy-adapter.rs
@@ -1,22 +0,0 @@
-
use std::{thread, time::Duration};
-

-
use radicle_ci_broker::msg::{Request, Response, RunId, RunResult};
-

-
fn main() {
-
    let _req = Request::from_reader(std::io::stdin()).unwrap();
-

-
    let pid = std::process::id();
-
    let run_id = format!("xyzzy-{}", pid);
-

-
    let first = Response::triggered(RunId::from(run_id.as_str()));
-
    first.to_writer(std::io::stdout()).unwrap();
-

-
    thread::sleep(Duration::from_millis(3000));
-

-
    let second = if pid % 2 == 0 {
-
        Response::finished(RunResult::Success)
-
    } else {
-
        Response::finished(RunResult::Failure)
-
    };
-
    second.to_writer(std::io::stdout()).unwrap();
-
}