Radish alpha
r
rad:zwTxygwuz5LDGBq255RA2CbNGrz8
Radicle CI broker
Radicle
Git
chore: drop unused timeout related logger functions
Lars Wirzenius committed 8 months ago
commit 7f97303e1742240e1cd4422fdd7517c30b842162
parent 2731720
1 file changed +0 -304
modified src/logger.rs
@@ -174,35 +174,6 @@ enum Id {
    QueueProcProcessorResult,
    QueueProcWorkerResult,

-
    TimeoutLineReceiverCheckChild,
-
    TimeoutLineReceiverChildDisconnected,
-
    TimeoutLineReceiverDisconnected,
-
    TimeoutLineReceiverLine,
-
    TimeoutLineReceiverLostChild,
-
    TimeoutLineReceiverTried,
-
    TimeoutLineReceiverTry,
-
    TimeoutNannyEnd,
-
    TimeoutNannyLostChild,
-
    TimeoutNannyNotifyTooLong,
-
    TimeoutNannyStart,
-
    TimeoutNannyTooLong,
-
    TimeoutNannyWaitEnd,
-
    TimeoutNannyWaitWord,
-
    TimeoutNannyWord,
-
    TimeoutNonblockingEnd,
-
    TimeoutNonblockingEndOfFile,
-
    TimeoutNonblockingError,
-
    TimeoutNonblockingTooMuch,
-
    TimeoutNonblockingTried,
-
    TimeoutNonblockingTry,
-
    TimeoutOk,
-
    TimeoutRequestEnd,
-
    TimeoutWaitChildEnd,
-
    TimeoutWaitChildExitStatus,
-
    TimeoutWaitStderrReaderEnd,
-
    TimeoutWaitStdinWriterEnd,
-
    TimeoutWaitStdoutReaderEnd,
-

    TriggerCreate,

    FilterDecision,
@@ -900,281 +871,6 @@ pub fn job_run_finished(job_id: JobId, run_id: Uuid, reason: Reason) {
    );
}

-
pub fn timeoutcmd_request_termination(result: Result<(), std::sync::mpsc::SendError<()>>) {
-
    trace!(
-
        msg_id = ?Id::TimeoutRequestEnd,
-
        kind = %Kind::Debug,
-
        ?result,
-
        "request termination of child process"
-
    );
-
}
-

-
pub fn timeoutcmd_wait_word_from_nanny() {
-
    trace!(
-
        msg_id = ?Id::TimeoutNannyWaitWord,
-
        kind = %Kind::Debug,
-
        "wait: wait for word from nanny"
-
    );
-
}
-

-
pub fn timeoutcmd_wait_got_word_from_nanny() {
-
    trace!(
-
        msg_id = ?Id::TimeoutNannyWord,
-
        kind = %Kind::Debug,
-
        "got word from nanny"
-
    );
-
}
-

-
pub fn timeoutcmd_wait_on_nanny_to_end() {
-
    trace!(
-
        msg_id = ?Id::TimeoutNannyWaitEnd,
-
        kind = %Kind::Debug,
-
        "wait: wait on nanny thread to end"
-
    );
-
}
-

-
pub fn timeoutcmd_wait_on_stdin_writer_to_end() {
-
    trace!(
-
        msg_id = ?Id::TimeoutWaitStdinWriterEnd,
-
        kind = %Kind::Debug,
-
        "wait: wait for stdin writer to terminate"
-
    );
-
}
-

-
pub fn timeoutcmd_wait_on_stdout_reader_to_end() {
-
    trace!(
-
        msg_id = ?Id::TimeoutWaitStdoutReaderEnd,
-
        kind = %Kind::Debug,
-
        "wait: wait for stdout reader to terminate"
-
    );
-
}
-

-
pub fn timeoutcmd_wait_on_stderr_reader_to_end() {
-
    trace!(
-
        msg_id = ?Id::TimeoutWaitStderrReaderEnd,
-
        kind = %Kind::Debug,
-
        "wait: wait for stderr reader to terminate"
-
    );
-
}
-

-
pub fn timeoutcmd_wait_on_child_to_end() {
-
    trace!(
-
        msg_id = ?Id::TimeoutWaitChildEnd,
-
        lkind = %Kind::Debug,
-
        "wait: wait for child to terminate"
-
    );
-
}
-

-
pub fn timeoutcmd_wait_status(status: ExitStatus) {
-
    trace!(
-
        msg_id = ?Id::TimeoutWaitChildExitStatus,
-
        kind = %Kind::Debug,
-
        ?status,
-
        "wait: wait status"
-
    );
-
}
-

-
pub fn timeoutcmd_ok() {
-
    trace!(
-
        msg_id = ?Id::TimeoutOk,
-
        kind = %Kind::Debug,
-
        "wait: return Ok result"
-
    );
-
}
-

-
pub fn timeoutcmd_nanny_start() {
-
    trace!(
-
        kind = %Kind::Debug,
-
        "nanny: start monitoring child"
-
    );
-
}
-

-
pub fn timeoutcmd_nanny_terminated_as_requested(result: Result<(), std::io::Error>) {
-
    trace!(
-
        msg_id = ?Id::TimeoutNannyStart,
-
        kind = %Kind::Debug,
-
        ?result,
-
        "nanny: terminated child by request"
-
    );
-
}
-

-
pub fn timeoutcmd_nanny_too_long(
-
    id: u32,
-
    elapsed: Duration,
-
    max: Duration,
-
    result: Result<(), std::io::Error>,
-
) {
-
    trace!(
-
        msg_id = ?Id::TimeoutNannyTooLong,
-
        kind = %Kind::Debug,
-
        %id,
-
        elapsed_ms = elapsed.as_millis(),
-
        max_ms = max.as_millis(),
-
        ?result,
-
        "nanny: child has run for too long",
-
    );
-
}
-

-
pub fn timeoutcmd_nanny_child_died() {
-
    trace!(
-
        msg_id = ?Id::TimeoutNannyLostChild,
-
        kind = %Kind::Debug,
-
        "nanny: child has terminated"
-
    );
-
}
-

-
pub fn timeoutcmd_nanny_time_to_end() {
-
    trace!(
-
        msg_id = ?Id::TimeoutNannyNotifyTooLong,
-
        kind = %Kind::Debug,
-
        "nanny: tell other threads it's time to end"
-
    );
-
}
-

-
pub fn timeoutcmd_nanny_ends() {
-
    trace!(
-
        msg_id = ?Id::TimeoutNannyEnd,
-
        kind = %Kind::Debug,
-
        "nanny: ends"
-
    );
-
}
-

-
pub fn timeoutcmd_line_reader_try_byte(thread: &'static str) {
-
    trace!(
-
        msg_id = ?Id::TimeoutLineReceiverTry,
-
        kind = %Kind::Debug,
-
        %thread,
-
        "line receiver: try to receive next byte"
-
    );
-
}
-

-
pub fn timeoutcmd_line_reader_tried_byte(
-
    thread: &'static str,
-
    result: Result<u8, std::sync::mpsc::TryRecvError>,
-
) {
-
    trace!(
-
        msg_id = ?Id::TimeoutLineReceiverTried,
-
        kind = %Kind::Debug,
-
        ?result,
-
        %thread,
-
        "line receiver: tried to read line"
-
    );
-
}
-

-
pub fn timeoutcmd_line_reader_got_line(thread: &'static str, line: &str) {
-
    trace!(
-
        msg_id = ?Id::TimeoutLineReceiverLine,
-
        kind = %Kind::Debug,
-
        ?line,
-
        %thread,
-
        "line-receiver: received line"
-
    );
-
}
-

-
pub fn timeoutcmd_line_reader_got_disconnected(thread: &'static str) {
-
    trace!(
-
        msg_id = ?Id::TimeoutLineReceiverDisconnected,
-
        kind = %Kind::Debug,
-
        %thread,
-
        "line-receiver: disconnected"
-
    );
-
}
-

-
pub fn timeoutcmd_line_reader_did_child_die(thread: &'static str) {
-
    trace!(
-
        msg_id = ?Id::TimeoutLineReceiverCheckChild,
-
        kind = %Kind::Debug,
-
        %thread,
-
        "line-receiver: has child terminated?"
-
    );
-
}
-

-
pub fn timeoutcmd_line_reader_child_died(thread: &'static str) {
-
    trace!(
-
        msg_id = ?Id::TimeoutLineReceiverLostChild,
-
        kind = %Kind::Debug,
-
        %thread,
-
        "line receiver: OK: child has terminated, not returning line",
-
    );
-
}
-

-
pub fn timeoutcmd_line_reader_child_channel_disconnected(thread: &'static str) {
-
    trace!(
-
        msg_id = ?Id::TimeoutLineReceiverChildDisconnected,
-
        kind = %Kind::Debug,
-
        %thread,
-
        "line receiver: Disconnected: child has terminated, not returning line",
-
    );
-
}
-

-
pub fn timeoutcmd_nonblocking_try_byte(thread: &'static str, count: usize) {
-
    trace!(
-
        msg_id = ?Id::TimeoutNonblockingTry,
-
        kind = %Kind::Debug,
-
        received_so_far = count,
-
        %thread,
-
        "read_to_end: try to receive next byte",
-
    );
-
}
-

-
pub fn timeoutcmd_nonblocking_tried_byte(
-
    thread: &'static str,
-
    result: &Result<usize, std::io::Error>,
-
    byte: &[u8],
-
) {
-
    trace!(
-
        msg_id = ?Id::TimeoutNonblockingTried,
-
        kind = %Kind::Debug,
-
        ?result,
-
        ?byte,
-
        %thread,
-
        "read_to_end: tried to receive byte",
-
    );
-
}
-

-
pub fn timeoutcmd_nonblocking_eof(thread: &'static str) {
-
    trace!(
-
        msg_id = ?Id::TimeoutNonblockingEndOfFile,
-
        kind = %Kind::Debug,
-
        %thread,
-
        "read_to_end: got end of file"
-
    );
-
}
-

-
pub fn timeoutcmd_nonblocking_got_too_much(
-
    thread: &'static str,
-
    result: Result<usize, std::io::Error>,
-
    byte: &[u8],
-
) {
-
    trace!(
-
        msg_id = ?Id::TimeoutNonblockingTooMuch,
-
        kind = %Kind::Debug,
-
        ?result,
-
        ?byte,
-
        %thread,
-
        "read_to_end: received too much",
-
    );
-
}
-

-
pub fn timeoutcmd_nonblocking_read_error(thread: &'static str, err: &std::io::Error) {
-
    trace!(
-
        msg_id = ?Id::TimeoutNonblockingError,
-
        kind = %Kind::Debug,
-
        ?err,
-
        %thread,
-
        "read_to_end: read error"
-
    );
-
}
-

-
pub fn timeoutcmd_nonblocking_ends(thread: &'static str) {
-
    trace!(
-
        msg_id = ?Id::TimeoutNonblockingEnd,
-
        kind = %Kind::Debug,
-
        %thread,
-
        "read_to_end: ends"
-
    );
-
}
-

pub fn event_filter_decision(filter: &'static str, allowed: bool, reason: &str) {
    info!(
        msg_id = ?Id::FilterDecision,