Radish alpha
r
Radicle CI broker
Radicle
Git (anonymous pull)
Log in to clone via SSH
drop status page argument for Adapter::run
Lars Wirzenius committed 1 year ago
commit 67b66b1f910e0a84b7b4bc515ba54aca780a12a0
parent e4573ec3fbb7579d3691348df8de8efc9a23c8e0
1 file changed +3 -12
modified src/adapter.rs
@@ -55,23 +55,16 @@ impl Adapter {
        &self,
        trigger: &Request,
        run: &mut Run,
-
        status: &mut StatusPage,
+
        _status: &mut StatusPage,
    ) -> Result<(), AdapterError> {
        debug!("running adapter");
        run.set_state(RunState::Triggered);
-
        status.push_run(run.clone());
-
        let x = self.run_helper(trigger, run, status);
+
        let x = self.run_helper(trigger, run);
        run.set_state(RunState::Finished);
-
        status.push_run(run.clone());
        x
    }

-
    fn run_helper(
-
        &self,
-
        trigger: &Request,
-
        run: &mut Run,
-
        status: &mut StatusPage,
-
    ) -> Result<(), AdapterError> {
+
    fn run_helper(&self, trigger: &Request, run: &mut Run) -> Result<(), AdapterError> {
        assert!(matches!(trigger, Request::Trigger { .. }));

        // Spawn the adapter sub-process.
@@ -112,7 +105,6 @@ impl Adapter {
                    if let Some(url) = info_url {
                        run.set_adapter_info_url(&url);
                    }
-
                    status.push_run(run.clone());
                }
                _ => return Err(AdapterError::NotTriggered(resp)),
            }
@@ -127,7 +119,6 @@ impl Adapter {
            match resp {
                Response::Finished { result } => {
                    run.set_result(result);
-
                    status.push_run(run.clone());
                }
                _ => return Err(AdapterError::NotFinished(resp)),
            }