Skip to content

Commit

Permalink
Fix: Exclude containers in STOPPING status from concurrency limits (#677
Browse files Browse the repository at this point in the history
)
  • Loading branch information
jsun-m authored Oct 31, 2024
1 parent 1e99cdc commit f0fd4a6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/repository/container_redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,10 @@ func (c *ContainerRedisRepository) SetContainerStateWithConcurrencyLimit(quota *
totalCpu := 0
totalMemory := int64(0)
for _, container := range containers {
if container.Status == types.ContainerStatusStopping {
continue
}

totalGpuCount += int(container.GpuCount)
totalCpu += int(container.Cpu)
totalMemory += container.Memory
Expand Down

0 comments on commit f0fd4a6

Please sign in to comment.