Skip to content

Commit

Permalink
Merge pull request #2743 from PrefectHQ/read-deployment-concurrency-l…
Browse files Browse the repository at this point in the history
…imit-from-nested-gcl

Fix deployment.concurrency_limit always null.
  • Loading branch information
collincchoy authored Sep 19, 2024
2 parents e337ee0 + 6fa1674 commit 8087d90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/maps/deployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const mapDeploymentResponseToDeployment: MapFunction<DeploymentResponse,
can: createObjectLevelCan(),
status: this.map('ServerDeploymentStatus', source.status, 'DeploymentStatus'),
disabled: source.disabled ?? false,
concurrencyLimit: source.concurrency_limit,
concurrencyLimit: source.concurrency_limit ?? source.global_concurrency_limit?.limit ?? null,
})
}

Expand Down
2 changes: 2 additions & 0 deletions src/models/api/DeploymentResponse.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { ConcurrencyV2Response } from '@/models/api/ConcurrencyV2Response'
import { CreatedOrUpdatedByResponse } from '@/models/api/CreatedOrUpdatedByResponse'
import { DeploymentScheduleResponse } from '@/models/api/DeploymentScheduleResponse'
import { ScheduleResponse } from '@/models/api/ScheduleResponse'
Expand Down Expand Up @@ -36,4 +37,5 @@ export type DeploymentResponse = {
status: ServerDeploymentStatus,
disabled?: boolean,
concurrency_limit: number | null,
global_concurrency_limit: ConcurrencyV2Response | null,
}

0 comments on commit 8087d90

Please sign in to comment.