zeta: Smaller reject batches (#43942)
We were allowing the client to build up to `MAX_EDIT_PREDICTION_REJECTIONS_PER_REQUEST`. We'll now attempt to flush the rejections when we reach half max. Release Notes: - N/A
This commit is contained in:
@@ -993,7 +993,7 @@ impl Zeta {
|
||||
});
|
||||
|
||||
let reached_request_limit =
|
||||
self.rejected_predictions.len() >= MAX_EDIT_PREDICTION_REJECTIONS_PER_REQUEST;
|
||||
self.rejected_predictions.len() >= MAX_EDIT_PREDICTION_REJECTIONS_PER_REQUEST / 2;
|
||||
let reject_tx = self.reject_predictions_tx.clone();
|
||||
self.reject_predictions_debounce_task = Some(cx.spawn(async move |_this, cx| {
|
||||
const REJECT_REQUEST_DEBOUNCE: Duration = Duration::from_secs(15);
|
||||
|
||||
Reference in New Issue
Block a user