|
|
@@ -610,14 +610,24 @@ func generateCommand(repoName, processorType, codeRemotePath, dataRemotePath, bo |
|
|
|
command += commandDownload |
|
|
|
} |
|
|
|
|
|
|
|
//check download result |
|
|
|
commandCheckRes := "bash -c \"[[ $? -eq 0 ]] && exit 0 || exit -1;\"" |
|
|
|
command += commandCheckRes |
|
|
|
|
|
|
|
//unzip code & dataset |
|
|
|
toolUnzip := "unzip -q " |
|
|
|
if strings.HasSuffix(datasetName, ".tar.gz") { |
|
|
|
toolUnzip = "tar -zxvf " |
|
|
|
} |
|
|
|
commandUnzip := "cd /cache/dataset;" + toolUnzip + datasetName + ";cd /cache/code;unzip -q master.zip;" |
|
|
|
commandUnzip := "cd /cache/code;unzip -q master.zip;echo \"start to unzip dataset\";cd /cache/dataset;" + toolUnzip + datasetName + ";" |
|
|
|
command += commandUnzip |
|
|
|
|
|
|
|
//check unzip result |
|
|
|
commandCheckRes = "bash -c \"[[ $? -eq 0 ]] && exit 0 || exit -1;\"" |
|
|
|
command += commandCheckRes |
|
|
|
|
|
|
|
command += "echo \"unzip finished;start to exec code;\"" |
|
|
|
|
|
|
|
//exec code |
|
|
|
var parameters models.Parameters |
|
|
|
var paramCode string |
|
|
@@ -655,7 +665,7 @@ func generateCommand(repoName, processorType, codeRemotePath, dataRemotePath, bo |
|
|
|
} |
|
|
|
|
|
|
|
//check exec result |
|
|
|
commandCheckRes := "bash -c \"[[ $result -eq 0 ]] && exit 0 || exit -1;\"" |
|
|
|
commandCheckRes = "bash -c \"[[ $result -eq 0 ]] && exit 0 || exit -1;\"" |
|
|
|
command += commandCheckRes |
|
|
|
|
|
|
|
return command, nil |
|
|
|