Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/ninety-mirrors-smash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"lingo.dev": minor
---

Remove hardcoded concurrency limit
12 changes: 10 additions & 2 deletions packages/cli/src/cli/cmd/run/execute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,22 @@ import { commonTaskRendererOptions } from "./_const";
import createBucketLoader from "../../loaders";
import { createDeltaProcessor, Delta } from "../../utils/delta";

const MAX_WORKER_COUNT = 10;
const WARN_CONCURRENCY_COUNT = 30;

export default async function execute(input: CmdRunContext) {
const effectiveConcurrency = Math.min(
input.flags.concurrency,
input.tasks.length,
MAX_WORKER_COUNT,
);

if (effectiveConcurrency >= WARN_CONCURRENCY_COUNT) {
console.warn(
chalk.yellow(
`⚠️ High concurrency (${effectiveConcurrency}) may cause failures in some environments.`,
),
);
}

console.log(chalk.hex(colors.orange)(`[Localization]`));

return new Listr<CmdRunContext>(
Expand Down
Loading