func (r *StateRestore) JobRestore(job *structs.Job) error {
	// Create the EphemeralDisk if it's nil by adding up DiskMB from task resources.
	// COMPAT 0.4.1 -> 0.5
	r.addEphemeralDiskToTaskGroups(job)

	if err := r.txn.Insert("jobs", job); err != nil {
		return fmt.Errorf("job insert failed: %v", err)
	}
	return nil
}
// JobRestore is used to restore a job
JobRestore is used to restore a job
// JobRestore is used to restore a job
func (r *StateRestore) JobRestore(job *structs.Job) error {
	r.addEphemeralDiskToTaskGroups(job)
	if err := r.txn.Insert("jobs", job); err != nil {
		return fmt.Errorf("job insert failed: %v", err)
	}
	return nil
}
func ( r * StateRestore ) JobRestore ( job * structs . Job ) error { r . addEphemeralDiskToTaskGroups ( job ) if err := r . txn . Insert ( " " , job ) ; err != nil { return fmt . Errorf ( " " , err ) } return nil }
JobRestore is used to restore a job
JobRestore is used to restore a job
// Create the EphemeralDisk if it's nil by adding up DiskMB from task resources. // COMPAT 0.4.1 -> 0.5