File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -754,8 +754,8 @@ const EnvironmentSchema = z
754754 /** The max number of runs per API call that we'll dequeue in DEV */
755755 DEV_DEQUEUE_MAX_RUNS_PER_PULL : z . coerce . number ( ) . int ( ) . default ( 10 ) ,
756756
757- /** The maximum concurrent local run processes executing at once in dev */
758- DEV_MAX_CONCURRENT_RUNS : z . coerce . number ( ) . int ( ) . default ( 25 ) ,
757+ /** The maximum concurrent local run processes executing at once in dev. This is a hard limit */
758+ DEV_MAX_CONCURRENT_RUNS : z . coerce . number ( ) . int ( ) . optional ( ) ,
759759
760760 /** The CLI should connect to this for dev runs */
761761 DEV_ENGINE_URL : z . string ( ) . default ( process . env . APP_ORIGIN ?? "http://localhost:3030" ) ,
Original file line number Diff line number Diff line change @@ -20,7 +20,11 @@ export const loader = createLoaderApiRoute(
2020 environmentId : authentication . environment . id ,
2121 dequeueIntervalWithRun : env . DEV_DEQUEUE_INTERVAL_WITH_RUN ,
2222 dequeueIntervalWithoutRun : env . DEV_DEQUEUE_INTERVAL_WITHOUT_RUN ,
23- maxConcurrentRuns : authentication . environment . maximumConcurrencyLimit ,
23+ // Limit max runs to smaller of an optional global limit and the environment limit
24+ maxConcurrentRuns : Math . min (
25+ env . DEV_MAX_CONCURRENT_RUNS ?? authentication . environment . maximumConcurrencyLimit ,
26+ authentication . environment . maximumConcurrencyLimit
27+ ) ,
2428 engineUrl : env . DEV_ENGINE_URL ,
2529 } ) ;
2630 } catch ( error ) {
You can’t perform that action at this time.
0 commit comments