func (m *Manager) UpdateWorkload(oldW, w *kueue.QueuedWorkload) bool {
	m.Lock()
	defer m.Unlock()
	if oldW.Spec.QueueName != w.Spec.QueueName {
		m.deleteWorkloadFromQueueAndClusterQueue(w, queueKeyForWorkload(oldW))
		return m.addOrUpdateWorkload(w)
	}

	q := m.queues[queueKeyForWorkload(w)]
	if q == nil {
		return false
	}
	cq := m.clusterQueues[q.ClusterQueue]
	if cq != nil {
		cq.PushOrUpdate(w)
		return true
	}
	return false
}
// UpdateWorkload updates the workload to the corresponding queue or adds it if
// it didn't exist. Returns whether the queue existed.
UpdateWorkload updates the workload to the corresponding queue or adds it if
it didn't exist. Returns whether the queue existed.
// UpdateWorkload updates the workload to the corresponding queue or adds it if // it didn ' t exist . Returns whether the queue existed .
func (m *Manager) UpdateWorkload(oldW, w *kueue.QueuedWorkload) bool {
	m.Lock()
	defer m.Unlock()
	if oldW.Spec.QueueName != w.Spec.QueueName {
		m.deleteWorkloadFromQueueAndClusterQueue(w, queueKeyForWorkload(oldW))
		return m.addOrUpdateWorkload(w)
	}
	q := m.queues[queueKeyForWorkload(w)]
	if q == nil {
		return false
	}
	cq := m.clusterQueues[q.ClusterQueue]
	if cq != nil {
		cq.PushOrUpdate(w)
		return true
	}
	return false
}
func ( m * Manager ) UpdateWorkload ( oldW , w * kueue . QueuedWorkload ) bool { m . Lock ( ) defer m . Unlock ( ) if oldW . Spec . QueueName != w . Spec . QueueName { m . deleteWorkloadFromQueueAndClusterQueue ( w , queueKeyForWorkload ( oldW ) ) return m . addOrUpdateWorkload ( w ) } q := m . queues [ queueKeyForWorkload ( w ) ] if q == nil { return false } cq := m . clusterQueues [ q . ClusterQueue ] if cq != nil { cq . PushOrUpdate ( w ) return true } return false }
UpdateWorkload updates the workload to the corresponding queue or adds it if
it didn't exist.
UpdateWorkload updates the workload to the corresponding queue or adds it if it didn ' t exist .