mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 12:40:44 +00:00
feat(DataProcessor): use constant for concurrency limit in pLimit calls
This commit is contained in:
parent
dd56345ac6
commit
e29aab478e
2 changed files with 6 additions and 10 deletions
|
|
@ -45,6 +45,8 @@ import {
|
|||
|
||||
const logger = createDebugLogger('DataProcessor');
|
||||
|
||||
const CONCURRENCY_LIMIT = 2;
|
||||
|
||||
export class DataProcessor {
|
||||
constructor(private config: Config) {}
|
||||
|
||||
|
|
@ -565,7 +567,7 @@ export class DataProcessor {
|
|||
],
|
||||
};
|
||||
|
||||
const limit = pLimit(2);
|
||||
const limit = pLimit(CONCURRENCY_LIMIT);
|
||||
|
||||
try {
|
||||
const [
|
||||
|
|
@ -969,7 +971,7 @@ None captured`;
|
|||
logger.info(`Analyzing ${recentFiles.length} recent sessions with LLM...`);
|
||||
|
||||
// Create a limit function with concurrency of 4 to avoid 429 errors
|
||||
const limit = pLimit(2);
|
||||
const limit = pLimit(CONCURRENCY_LIMIT);
|
||||
|
||||
let completed = 0;
|
||||
const total = recentFiles.length;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue