perf: allow BATCH_PULL_SIZE in any mode for benchmarking
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -321,8 +321,9 @@ pub fn start_background_processor(
|
||||
result: SendResultPayload::JobCompleted(jc),
|
||||
time,
|
||||
}) => {
|
||||
let batch_mode = windmill_common::utils::MODE_AND_ADDONS.mode
|
||||
== windmill_common::utils::Mode::AgentBatch;
|
||||
let batch_mode = *windmill_common::worker::BATCH_PULL_SIZE > 0
|
||||
|| windmill_common::utils::MODE_AND_ADDONS.mode
|
||||
== windmill_common::utils::Mode::AgentBatch;
|
||||
|
||||
if batch_mode && is_batchable(&jc) {
|
||||
// Accumulate for batch commit
|
||||
|
||||
@@ -2077,15 +2077,15 @@ pub async fn run_worker(
|
||||
|
||||
let is_agent_batch =
|
||||
windmill_common::utils::MODE_AND_ADDONS.mode == windmill_common::utils::Mode::AgentBatch;
|
||||
let batch_pull_size = if is_agent_batch {
|
||||
let batch_pull_size = {
|
||||
let s = *windmill_common::worker::BATCH_PULL_SIZE;
|
||||
if s > 0 {
|
||||
s
|
||||
} else {
|
||||
} else if is_agent_batch {
|
||||
100
|
||||
} else {
|
||||
0
|
||||
}
|
||||
} else {
|
||||
0
|
||||
};
|
||||
let mut batch_pull_buffer: std::collections::VecDeque<windmill_queue::PulledJob> =
|
||||
std::collections::VecDeque::new();
|
||||
|
||||
Reference in New Issue
Block a user