重构名字
This commit is contained in:
		@@ -2,7 +2,7 @@ package task
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"git.huangwc.com/pig/pig-farm-controller/internal/domain/device"
 | 
			
		||||
	"git.huangwc.com/pig/pig-farm-controller/internal/domain/scheduler"
 | 
			
		||||
	"git.huangwc.com/pig/pig-farm-controller/internal/domain/plan"
 | 
			
		||||
	"git.huangwc.com/pig/pig-farm-controller/internal/infra/logs"
 | 
			
		||||
	"git.huangwc.com/pig/pig-farm-controller/internal/infra/models"
 | 
			
		||||
	"git.huangwc.com/pig/pig-farm-controller/internal/infra/repository"
 | 
			
		||||
@@ -20,7 +20,7 @@ func NewTaskFactory(
 | 
			
		||||
	sensorDataRepo repository.SensorDataRepository,
 | 
			
		||||
	deviceRepo repository.DeviceRepository,
 | 
			
		||||
	deviceService device.Service,
 | 
			
		||||
) scheduler.TaskFactory {
 | 
			
		||||
) plan.TaskFactory {
 | 
			
		||||
	return &taskFactory{
 | 
			
		||||
		logger:         logger,
 | 
			
		||||
		sensorDataRepo: sensorDataRepo,
 | 
			
		||||
@@ -29,7 +29,7 @@ func NewTaskFactory(
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (t *taskFactory) Production(claimedLog *models.TaskExecutionLog) scheduler.Task {
 | 
			
		||||
func (t *taskFactory) Production(claimedLog *models.TaskExecutionLog) plan.Task {
 | 
			
		||||
	switch claimedLog.Task.Type {
 | 
			
		||||
	case models.TaskTypeWaiting:
 | 
			
		||||
		return NewDelayTask(t.logger, claimedLog)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user