apply review comment

This commit is contained in:
Tamo 2025-01-28 12:07:02 +01:00
parent e0f0da57e2
commit ef47a0d820
No known key found for this signature in database
GPG Key ID: 20CD8020AFA88D69
2 changed files with 2 additions and 2 deletions

View File

@ -245,7 +245,7 @@ impl BatchQueue {
wtxn,
self.enqueued_at,
old_batch.started_at,
if old_batch.stats.total_nb_tasks >= 2 { 2 } else { 1 },
old_batch.stats.total_nb_tasks.clamp(1, 2) as usize,
old_batch.uid,
)?;
}

View File

@ -538,7 +538,7 @@ impl IndexScheduler {
wtxn,
self.queue.batches.enqueued_at,
batch.started_at,
if batch.stats.total_nb_tasks >= 2 { 2 } else { 1 },
batch.stats.total_nb_tasks.clamp(1, 2) as usize,
batch_id,
)?;
}