//MarkAppAsSynced marks the specified app as synced in the specified stage
MarkAppAsSynced marks the specified app as synced in the specified stage
// MarkAppAsSynced marks the specified app as synced in the specified stage
func (s *InMemorySyncState) MarkAppAsSynced(app argov1alpha1.Application, stage syncv1alpha1.ProgressiveSyncStage) {
	s.Mutex.Lock()
	defer s.Mutex.Unlock()
	s.SyncedAtStage[app.Name] = stage.Name
	val, ok := s.SyncedAppsPerStage[stage.Name]
	if !ok {
		s.SyncedAppsPerStage[stage.Name] = 1
	} else {
		if val+1 > s.MaxTargetsPerStage[stage.Name] {
			s.SyncedAppsPerStage[stage.Name] = s.MaxTargetsPerStage[stage.Name]
		} else {
			s.SyncedAppsPerStage[stage.Name] = val + 1
		}
	}
}
func ( s * InMemorySyncState ) MarkAppAsSynced ( app argov1alpha1 . Application , stage syncv1alpha1 . ProgressiveSyncStage ) { s . Mutex . Lock ( ) defer s . Mutex . Unlock ( ) s . SyncedAtStage [ app . Name ] = stage . Name val , ok := s . SyncedAppsPerStage [ stage . Name ] if ! ok { s . SyncedAppsPerStage [ stage . Name ] = 1 } else { if val + 1 > s . MaxTargetsPerStage [ stage . Name ] { s . SyncedAppsPerStage [ stage . Name ] = s . MaxTargetsPerStage [ stage . Name ] } else { s . SyncedAppsPerStage [ stage . Name ] = val + 1 } } }
MarkAppAsSynced marks the specified app as synced in the specified stage
MarkAppAsSynced marks the specified app as synced in the specified stage