Radish alpha
r
Radicle CI broker
Radicle
Git (anonymous pull)
Log in to clone via SSH
feat(src/queueproc.rs): log reason why waiting for adapter fails
Lars Wirzenius committed 1 year ago
commit e5723448d4d230ff81545ae83eeeb868a5c0ff66
parent e49496122740153e2623df90d2de46a2591534e5
2 files changed +5 -4
modified src/adapter.rs
@@ -179,9 +179,8 @@ impl Adapter {
                logger::adapter_did_not_exit_voluntarily();
                outcome.set_error(AdapterError::FailedNotExited);
            }
-
            Err(_err) => {
-
                // FIXME this log message doesn't make sense any more; should log error
-
                logger::adapter_did_not_exit();
+
            Err(err) => {
+
                logger::adapter_did_not_exit(err);
                outcome.set_error(AdapterError::Signal(9));
            }
        }
modified src/logger.rs
@@ -21,6 +21,7 @@ use crate::{
    queueadd::AdderError,
    queueproc::QueueError,
    run::Run,
+
    timeoutcmd::TimeoutError,
};

#[derive(Debug, thiserror::Error)]
@@ -769,10 +770,11 @@ pub fn adapter_did_not_exit_voluntarily() {
    );
}

-
pub fn adapter_did_not_exit() {
+
pub fn adapter_did_not_exit(error: TimeoutError) {
    warn!(
        msg_id = ?Id::AdapterNoExit,
        kind = %Kind::Debug,
+
        ?error,
        "adapter did not exit: probably killed by signal"
    );
}