pub fn read_last_log_file_lines(
    task_id: usize,
    path: &Path,
    lines: usize,
) -> Result<(String, String), Error> {
    let (mut stdout_file, mut stderr_file) = match get_log_file_handles(task_id, path) {
        Ok((stdout, stderr)) => (stdout, stderr),
        Err(err) => {
            return Err(Error::LogRead(format!(
                "Error while opening log files for task {}: {}",
                task_id, err
            )));
        }
    };

    // Get the last few lines of both files
    Ok((
        read_last_lines(&mut stdout_file, lines),
        read_last_lines(&mut stderr_file, lines),
    ))
}
/// Return the last lines of `(stdout, stderr)` of a task. \
/// This output is uncompressed and may take a lot of memory, which is why we only read
/// the last few lines.
Return the last lines of `(stdout, stderr)` of a task. \
This output is uncompressed and may take a lot of memory, which is why we only read
the last few lines.
Return the last lines of ` ( stdout stderr ) ` of a task . \ This output is uncompressed and may take a lot of memory which is why we only read the last few lines .
pub fn read_last_log_file_lines(
    task_id: usize,
    path: &Path,
    lines: usize,
) -> Result<(String, String), Error> {
    let (mut stdout_file, mut stderr_file) = match get_log_file_handles(task_id, path) {
        Ok((stdout, stderr)) => (stdout, stderr),
        Err(err) => {
            return Err(Error::LogRead(format!(
                "Error while opening log files for task {}: {}",
                task_id, err
            )));
        }
    };
    // Get the last few lines of both files
    Ok((
        read_last_lines(&mut stdout_file, lines),
        read_last_lines(&mut stderr_file, lines),
    ))
}
pub fn read_last_log_file_lines ( task_id : usize , path : & Path , lines : usize , ) -> Result < ( String , String ) , Error > { let ( mut stdout_file , mut stderr_file ) = match get_log_file_handles ( task_id , path ) { Ok ( ( stdout , stderr ) ) => ( stdout , stderr ) , Err ( err ) => { return Err ( Error :: LogRead ( format ! ( " " task_id err ) ) ) ; } } ; // Get the last few lines of both files Ok ( ( read_last_lines ( & mut stdout_file , lines ) , read_last_lines ( & mut stderr_file , lines ) , ) ) }
Return the last lines of `(stdout, stderr)` of a task.
Return the last lines of ` ( stdout stderr ) ` of a task .
task_id
usize
path
&Path
lines
usize
task_id
usize
path
&Path
lines
usize