mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-01-07 12:04:30 +01:00
Make the tasks pulling timeout configurable
This commit is contained in:
parent
54341c2e80
commit
2da5584bb5
@ -82,6 +82,10 @@ pub struct BenchDeriveArgs {
|
|||||||
/// Reason for the benchmark invocation
|
/// Reason for the benchmark invocation
|
||||||
#[arg(short, long)]
|
#[arg(short, long)]
|
||||||
reason: Option<String>,
|
reason: Option<String>,
|
||||||
|
|
||||||
|
/// The maximum time in seconds we allow for fetching the task queue before timing out.
|
||||||
|
#[arg(long, default_value_t = 60)]
|
||||||
|
tasks_queue_timeout_secs: u64,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn run(args: BenchDeriveArgs) -> anyhow::Result<()> {
|
pub fn run(args: BenchDeriveArgs) -> anyhow::Result<()> {
|
||||||
@ -127,7 +131,7 @@ pub fn run(args: BenchDeriveArgs) -> anyhow::Result<()> {
|
|||||||
let meili_client = Client::new(
|
let meili_client = Client::new(
|
||||||
Some("http://127.0.0.1:7700".into()),
|
Some("http://127.0.0.1:7700".into()),
|
||||||
args.master_key.as_deref(),
|
args.master_key.as_deref(),
|
||||||
Some(std::time::Duration::from_secs(60)),
|
Some(std::time::Duration::from_secs(args.tasks_queue_timeout_secs)),
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
// enter runtime
|
// enter runtime
|
||||||
|
Loading…
x
Reference in New Issue
Block a user