func (s *StateStore) addEphemeralDiskToTaskGroups(job *structs.Job) {
	for _, tg := range job.TaskGroups {
		var diskMB int
		for _, task := range tg.Tasks {
			if task.Resources != nil {
				diskMB += task.Resources.DiskMB
				task.Resources.DiskMB = 0
			}
		}
		if tg.EphemeralDisk != nil {
			continue
		}
		tg.EphemeralDisk = &structs.EphemeralDisk{
			SizeMB: diskMB,
		}
	}
}
// addEphemeralDiskToTaskGroups adds missing EphemeralDisk objects to TaskGroups
addEphemeralDiskToTaskGroups adds missing EphemeralDisk objects to TaskGroups
// addEphemeralDiskToTaskGroups adds missing EphemeralDisk objects to TaskGroups
func (s *StateStore) addEphemeralDiskToTaskGroups(job *structs.Job) {
	for _, tg := range job.TaskGroups {
		var diskMB int
		for _, task := range tg.Tasks {
			if task.Resources != nil {
				diskMB += task.Resources.DiskMB
				task.Resources.DiskMB = 0
			}
		}
		if tg.EphemeralDisk != nil {
			continue
		}
		tg.EphemeralDisk = &structs.EphemeralDisk{
			SizeMB: diskMB,
		}
	}
}
func ( s * StateStore ) addEphemeralDiskToTaskGroups ( job * structs . Job ) { for _ , tg := range job . TaskGroups { var diskMB int for _ , task := range tg . Tasks { if task . Resources != nil { diskMB += task . Resources . DiskMB task . Resources . DiskMB = 0 } } if tg . EphemeralDisk != nil { continue } tg . EphemeralDisk = & structs . EphemeralDisk { SizeMB : diskMB , } } }
addEphemeralDiskToTaskGroups adds missing EphemeralDisk objects to TaskGroups
addEphemeralDiskToTaskGroups adds missing EphemeralDisk objects to TaskGroups