@@ -20,20 +20,17 @@ export type WaitpointSystemOptions = {
2020 resources : SystemResources ;
2121 executionSnapshotSystem : ExecutionSnapshotSystem ;
2222 enqueueSystem : EnqueueSystem ;
23- releaseConcurrencySystem : ReleaseConcurrencySystem ;
2423} ;
2524
2625export class WaitpointSystem {
2726 private readonly $ : SystemResources ;
2827 private readonly executionSnapshotSystem : ExecutionSnapshotSystem ;
29- private readonly releaseConcurrencySystem : ReleaseConcurrencySystem ;
3028 private readonly enqueueSystem : EnqueueSystem ;
3129
3230 constructor ( private readonly options : WaitpointSystemOptions ) {
3331 this . $ = options . resources ;
3432 this . executionSnapshotSystem = options . executionSnapshotSystem ;
3533 this . enqueueSystem = options . enqueueSystem ;
36- this . releaseConcurrencySystem = options . releaseConcurrencySystem ;
3734 }
3835
3936 shouldReleaseConcurrencyOnWaitpointForQueue ( queue : TaskQueue ) {
@@ -456,29 +453,6 @@ export class WaitpointSystem {
456453
457454 // Let the worker know immediately, so it can suspend the run
458455 await sendNotificationToWorker ( { runId, snapshot, eventBus : this . $ . eventBus } ) ;
459-
460- if ( isRunBlocked ) {
461- //release concurrency
462- const run = await this . $ . prisma . taskRun . findFirst ( {
463- where : { id : runId } ,
464- select : {
465- id : true ,
466- organizationId : true ,
467- lockedQueueReleaseConcurrencyOnWaitpoint : true ,
468- } ,
469- } ) ;
470-
471- if ( ! run ) {
472- this . $ . logger . error (
473- "WaitpointSystem.blockRunWithWaitpoint(): Run not found, cannot release concurrency" ,
474- {
475- runId,
476- }
477- ) ;
478- } else {
479- await this . releaseConcurrencySystem . releaseConcurrency ( run , releaseConcurrency ) ;
480- }
481- }
482456 }
483457
484458 if ( timeout ) {
@@ -557,6 +531,7 @@ export class WaitpointSystem {
557531 id : true ,
558532 type : true ,
559533 maximumConcurrencyLimit : true ,
534+ concurrencyLimitBurstFactor : true ,
560535 project : { select : { id : true } } ,
561536 organization : { select : { id : true } } ,
562537 } ,
0 commit comments