// IsStageInProgress returns true if at least one app is is in progress
IsStageInProgress returns true if at least one app is is in progress
// IsStageInProgress returns true if at least one app is is in progress
func IsStageInProgress(apps []argov1alpha1.Application, stage syncv1alpha1.ProgressiveSyncStage, pss utils.ProgressiveSyncState) bool {
	if apps == nil {
		return false
	}
	progressingApps := utils.GetAppsByHealthStatusCode(apps, health.HealthStatusProgressing)
	progressingSyncedApps := utils.GetSyncedAppsByStage(progressingApps, stage, pss)
	appsSyncedSoFar := utils.GetSyncedAppsByStage(apps, stage, pss)
	return len(progressingSyncedApps) > 0 || len(appsSyncedSoFar) < pss.GetMaxTargets(stage)
}
func IsStageInProgress ( apps [ ] argov1alpha1 . Application , stage syncv1alpha1 . ProgressiveSyncStage , pss utils . ProgressiveSyncState ) bool { if apps == nil { return false } progressingApps := utils . GetAppsByHealthStatusCode ( apps , health . HealthStatusProgressing ) progressingSyncedApps := utils . GetSyncedAppsByStage ( progressingApps , stage , pss ) appsSyncedSoFar := utils . GetSyncedAppsByStage ( apps , stage , pss ) return len ( progressingSyncedApps ) > 0 || len ( appsSyncedSoFar ) < pss . GetMaxTargets ( stage ) }
IsStageInProgress returns true if at least one app is is in progress
IsStageInProgress returns true if at least one app is is in progress
// An stage is in progress if: // - there is at least one app with Health Status Code == Progressing // - the number of apps synced so far is less than the apps to sync