func (s *StateStore) UpdateDeploymentStatus(index uint64, req *structs.DeploymentStatusUpdateRequest) error {
	txn := s.db.Txn(true)
	defer txn.Abort()

	if err := s.updateDeploymentStatusImpl(index, req.DeploymentUpdate, txn); err != nil {
		return err
	}

	// Upsert the job if necessary
	if req.Job != nil {
		if err := s.upsertJobImpl(index, req.Job, false, txn); err != nil {
			return err
		}
	}

	// Upsert the optional eval
	if req.Eval != nil {
		if err := s.nestedUpsertEval(txn, index, req.Eval); err != nil {
			return err
		}
	}

	txn.Commit()
	return nil
}
// UpdateDeploymentStatus is used to make deployment status updates and
// potentially make a evaluation
UpdateDeploymentStatus is used to make deployment status updates and
potentially make a evaluation
// UpdateDeploymentStatus is used to make deployment status updates and // potentially make a evaluation
func (s *StateStore) UpdateDeploymentStatus(index uint64, req *structs.DeploymentStatusUpdateRequest) error {
	txn := s.db.Txn(true)
	defer txn.Abort()
	if err := s.updateDeploymentStatusImpl(index, req.DeploymentUpdate, txn); err != nil {
		return err
	}
	if req.Job != nil {
		if err := s.upsertJobImpl(index, req.Job, false, txn); err != nil {
			return err
		}
	}
	if req.Eval != nil {
		if err := s.nestedUpsertEval(txn, index, req.Eval); err != nil {
			return err
		}
	}
	txn.Commit()
	return nil
}
func ( s * StateStore ) UpdateDeploymentStatus ( index uint64 , req * structs . DeploymentStatusUpdateRequest ) error { txn := s . db . Txn ( true ) defer txn . Abort ( ) if err := s . updateDeploymentStatusImpl ( index , req . DeploymentUpdate , txn ) ; err != nil { return err } if req . Job != nil { if err := s . upsertJobImpl ( index , req . Job , false , txn ) ; err != nil { return err } } if req . Eval != nil { if err := s . nestedUpsertEval ( txn , index , req . Eval ) ; err != nil { return err } } txn . Commit ( ) return nil }
UpdateDeploymentStatus is used to make deployment status updates and
potentially make a evaluation
UpdateDeploymentStatus is used to make deployment status updates and potentially make a evaluation
// Upsert the job if necessary // Upsert the optional eval