feat: expose global execution concurrency limit in settings

- Add PUT /api/global-concurrency endpoint to update globalMaxConcurrent
  via CentralCore (validated 1-50 range)
- Make InProcessRuntime semaphore react to live concurrency changes via
  CentralCore "concurrency:changed" event — no restart needed
- Add Global Max Concurrent input to Settings modal Scheduling section
  with fetch-on-mount and save-alongside-project-settings behavior
- Add updateGlobalConcurrency API client function

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-04-13 14:23:40 -07:00
parent 8b2eea90ff
commit f2afce2468
4 changed files with 77 additions and 5 deletions

View File

@@ -3191,6 +3191,13 @@ export function fetchGlobalConcurrency(): Promise<GlobalConcurrencyState> {
return api<GlobalConcurrencyState>("/global-concurrency");
}
export function updateGlobalConcurrency(updates: { globalMaxConcurrent: number }): Promise<GlobalConcurrencyState> {
return api<GlobalConcurrencyState>("/global-concurrency", {
method: "PUT",
body: JSON.stringify(updates),
});
}
/** Fetch tasks for a specific project */
export function fetchProjectTasks(projectId: string, limit?: number, offset?: number): Promise<Task[]> {
const params = new URLSearchParams();