(job JobListItemV2)
| 359 | } |
| 360 | |
| 361 | func (sm *StoreManager) SaveJobInfo(job JobListItemV2) error { |
| 362 | key := fmt.Sprintf("dtleJobList/%v", job.JobId) |
| 363 | jobBytes, err := json.Marshal(job) |
| 364 | if err != nil { |
| 365 | return fmt.Errorf("save %v to consul, marshal err : %v", key, err) |
| 366 | } |
| 367 | err = sm.consulStore.Put(key, jobBytes, nil) |
| 368 | return err |
| 369 | } |
| 370 | |
| 371 | func (sm *StoreManager) WaitOnJob(currentJob string, waitJob string, stopCh chan struct{}) error { |
| 372 | waitCh := make(chan struct{}, 0) |
no test coverage detected