func (s *StateStore) updateJobStabilityImpl(index uint64, jobID string, jobVersion uint64, stable bool, txn *memdb.Txn) error {
	// Get the job that is referenced
	job, err := s.jobByIDAndVersionImpl(nil, jobID, jobVersion, txn)
	if err != nil {
		return err
	}

	// Has already been cleared, nothing to do
	if job == nil {
		return nil
	}

	// If the job already has the desired stability, nothing to do
	if job.Stable == stable {
		return nil
	}

	copy := job.Copy()
	copy.Stable = stable
	return s.upsertJobImpl(index, copy, true, txn)
}
// updateJobStabilityImpl updates the stability of the given job and version
updateJobStabilityImpl updates the stability of the given job and version
// updateJobStabilityImpl updates the stability of the given job and version
func (s *StateStore) updateJobStabilityImpl(index uint64, jobID string, jobVersion uint64, stable bool, txn *memdb.Txn) error {
	job, err := s.jobByIDAndVersionImpl(nil, jobID, jobVersion, txn)
	if err != nil {
		return err
	}
	if job == nil {
		return nil
	}
	if job.Stable == stable {
		return nil
	}
	copy := job.Copy()
	copy.Stable = stable
	return s.upsertJobImpl(index, copy, true, txn)
}
func ( s * StateStore ) updateJobStabilityImpl ( index uint64 , jobID string , jobVersion uint64 , stable bool , txn * memdb . Txn ) error { job , err := s . jobByIDAndVersionImpl ( nil , jobID , jobVersion , txn ) if err != nil { return err } if job == nil { return nil } if job . Stable == stable { return nil } copy := job . Copy ( ) copy . Stable = stable return s . upsertJobImpl ( index , copy , true , txn ) }
updateJobStabilityImpl updates the stability of the given job and version
updateJobStabilityImpl updates the stability of the given job and version
// Get the job that is referenced // Has already been cleared, nothing to do // If the job already has the desired stability, nothing to do