mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
refactor: skip reconciliation for some presets (#17595)
This commit is contained in:
@@ -72,6 +72,10 @@ type ReconciliationActions struct {
|
||||
BackoffUntil time.Time
|
||||
}
|
||||
|
||||
func (ra *ReconciliationActions) IsNoop() bool {
|
||||
return ra.Create == 0 && len(ra.DeleteIDs) == 0 && ra.BackoffUntil.IsZero()
|
||||
}
|
||||
|
||||
// CalculateState computes the current state of prebuilds for a preset, including:
|
||||
// - Actual: Number of currently running prebuilds
|
||||
// - Desired: Number of prebuilds desired as defined in the preset
|
||||
|
||||
Reference in New Issue
Block a user