func (s *StateStore) UpsertJob(index uint64, job *structs.Job) error {
	txn := s.db.Txn(true)
	defer txn.Abort()
	if err := s.upsertJobImpl(index, job, false, txn); err != nil {
		return err
	}
	txn.Commit()
	return nil
}
// UpsertJob is used to register a job or update a job definition
UpsertJob is used to register a job or update a job definition
// UpsertJob is used to register a job or update a job definition
func (s *StateStore) UpsertJob(index uint64, job *structs.Job) error {
	txn := s.db.Txn(true)
	defer txn.Abort()
	if err := s.upsertJobImpl(index, job, false, txn); err != nil {
		return err
	}
	txn.Commit()
	return nil
}
func ( s * StateStore ) UpsertJob ( index uint64 , job * structs . Job ) error { txn := s . db . Txn ( true ) defer txn . Abort ( ) if err := s . upsertJobImpl ( index , job , false , txn ) ; err != nil { return err } txn . Commit ( ) return nil }
UpsertJob is used to register a job or update a job definition
UpsertJob is used to register a job or update a job definition