Status events with human readable time, bool set events
This commit is contained in:
@@ -108,7 +108,7 @@ async fn go() -> Result<(), Error> {
|
||||
}
|
||||
SubCmd::Logappend(k) => {
|
||||
let jh = tokio::task::spawn_blocking(move || {
|
||||
taskrun::append::append(&k.dir, std::io::stdin()).unwrap();
|
||||
taskrun::append::append(&k.dir, k.total_size_max_bytes(), std::io::stdin()).unwrap();
|
||||
});
|
||||
jh.await.map_err(Error::from_string)?;
|
||||
}
|
||||
|
||||
@@ -78,4 +78,12 @@ pub struct BinnedClient {
|
||||
pub struct Logappend {
|
||||
#[arg(long)]
|
||||
pub dir: String,
|
||||
#[arg(long)]
|
||||
pub total_mb: Option<u64>,
|
||||
}
|
||||
|
||||
impl Logappend {
|
||||
pub fn total_size_max_bytes(&self) -> u64 {
|
||||
1024 * 1024 * self.total_mb.unwrap_or(20)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user