|
|
@ -62,12 +62,12 @@ func NewLoadServiceImplement() *LoadServiceImplement { |
|
|
|
func (impl *LoadServiceImplement) Load(task *model.TaskHead) { |
|
|
|
log, _ := logger.NewLogger(task.TaskId, model.STAGE_LOAD_DATA) |
|
|
|
etcdTaskDao := dal.NewETCDServiceDAO(db.AppEtcdClient, config.AppConfig.App.LocalAddr) |
|
|
|
defer etcdTaskDao.RevokeLease() |
|
|
|
err := etcdTaskDao.RegisterTask(task.TaskId, model.STAGE_LOAD_DATA) |
|
|
|
if err != nil { |
|
|
|
log.Error("Load register task failed, error:"+err.Error(), "task id:"+strconv.Itoa(task.TaskId)) |
|
|
|
return |
|
|
|
} |
|
|
|
defer etcdTaskDao.RevokeLease() |
|
|
|
// 获取目标表和源表的驱动引擎
|
|
|
|
targetDBID := task.TargetDB |
|
|
|
global.ETLDriver.Lock.RLock() |
|
|
|