minor changes
- adjust `main` log levels - lower default upload chunk size to utilize common cache sizes
This commit is contained in:
parent
4c88ea7291
commit
f2b063ba85
2 changed files with 5 additions and 5 deletions
|
|
@ -8,7 +8,7 @@ use std::{
|
||||||
|
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
use console::{StyledObject, style};
|
use console::{StyledObject, style};
|
||||||
use log::{debug, info, trace};
|
use log::{info, trace};
|
||||||
|
|
||||||
use shrupl::{
|
use shrupl::{
|
||||||
AppState, Cli, error,
|
AppState, Cli, error,
|
||||||
|
|
@ -90,14 +90,14 @@ fn main() {
|
||||||
match p {
|
match p {
|
||||||
// Error 404 (File not found)
|
// Error 404 (File not found)
|
||||||
error::Parameter::FileID(fid) => {
|
error::Parameter::FileID(fid) => {
|
||||||
debug!("requeueing file {fid:?}");
|
info!("requeueing file {fid:?}");
|
||||||
|
|
||||||
state.abort_upload();
|
state.abort_upload();
|
||||||
}
|
}
|
||||||
// Error 404 (Share not found)
|
// Error 404 (Share not found)
|
||||||
error::Parameter::ShareID(sid) => {
|
error::Parameter::ShareID(sid) => {
|
||||||
// TODO ask
|
// TODO ask
|
||||||
debug!("rebuilding share {sid:?}");
|
info!("rebuilding share {sid:?}");
|
||||||
|
|
||||||
// rebuild share
|
// rebuild share
|
||||||
let Ok(s) = state.rebuild_share(&args) else {
|
let Ok(s) = state.rebuild_share(&args) else {
|
||||||
|
|
@ -114,7 +114,7 @@ fn main() {
|
||||||
};
|
};
|
||||||
tries += 1;
|
tries += 1;
|
||||||
|
|
||||||
debug!("State rewound, retrying last chunk (tries: {tries})");
|
info!("State rewound, retrying last chunk (tries: {tries})");
|
||||||
state = s;
|
state = s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ pub struct Cli {
|
||||||
/// Chunk size for uploading, in MiB
|
/// Chunk size for uploading, in MiB
|
||||||
#[arg(
|
#[arg(
|
||||||
short, long,
|
short, long,
|
||||||
default_value_t = 10, value_name = "M",
|
default_value_t = 4, value_name = "M",
|
||||||
value_parser = value_parser!(u32).range(1..).map(|s| s as usize),
|
value_parser = value_parser!(u32).range(1..).map(|s| s as usize),
|
||||||
)]
|
)]
|
||||||
pub chunk_size: usize,
|
pub chunk_size: usize,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue