Esempio n. 1
0
func createLocalFile(ts comp.RunTask) error {
	//create local file
	ex, err := comm.FileExists(ts.TaskInfo.JobId)
	if err != nil {
		return err
	}

	if !ex {
		//create local file
		err = os.Mkdir(ts.TaskInfo.JobId, os.ModePerm)
		if err != nil {
			return err
		}
		//make test locally
		ts.Frame = ts.Frame.MoveTestFile(ts.TaskInfo.JobId)
	}

	return nil
}
Esempio n. 2
0
//For func findBestJob only
func (m *JobManager) createRuntask(jobid, id string) comp.RunTask {
	var rt comp.RunTask
	rt.Frame = m.jobMap[jobid].JobInfo.Frame
	rt.TaskInfo = m.jobMap[jobid].TaskMap[id]
	return rt
}