Fastresume CLI option
This commit is contained in:
parent
e11744cd63
commit
65feec3406
3 changed files with 8 additions and 2 deletions
2
Makefile
2
Makefile
|
|
@ -20,7 +20,7 @@ devserver:
|
|||
echo -n '' > /tmp/rqbit-log && cargo run -- \
|
||||
--log-file /tmp/rqbit-log \
|
||||
--log-file-rust-log=debug,librqbit=trace \
|
||||
server start /tmp/scratch/
|
||||
server start --fastresume /tmp/scratch/
|
||||
|
||||
@PHONY: devserver
|
||||
devserver-postgres:
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ impl TorrentStateLocked {
|
|||
if self.unflushed_bitv_bytes == 0 {
|
||||
return;
|
||||
}
|
||||
|
||||
trace!("trying to flush bitfield");
|
||||
if let Some(Err(e)) = self
|
||||
.chunks
|
||||
.as_mut()
|
||||
|
|
|
|||
|
|
@ -143,6 +143,10 @@ struct ServerStartOptions {
|
|||
/// The folder to store session data in. By default uses OS specific folder.
|
||||
#[arg(long = "persistence-config")]
|
||||
persistence_config: Option<String>,
|
||||
|
||||
/// [Experimental] if set, will try to resume quickly after restart and skip checksumming.
|
||||
#[arg(long = "fastresume")]
|
||||
fastresume: bool,
|
||||
}
|
||||
|
||||
#[derive(Parser)]
|
||||
|
|
@ -422,6 +426,8 @@ async fn async_main(opts: Opts) -> anyhow::Result<()> {
|
|||
}
|
||||
}
|
||||
|
||||
sopts.fastresume = start_opts.fastresume;
|
||||
|
||||
let session =
|
||||
Session::new_with_opts(PathBuf::from(&start_opts.output_folder), sopts)
|
||||
.await
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue