Now that the user is required to set the java temp directory, it is safer for the LsfJobRunner to write to the java temp directory instead of the command directory.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4593 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
860de05a7c
commit
d768c6558d
|
|
@ -166,7 +166,7 @@ class LsfJobRunner(val function: CommandLineFunction) extends DispatchJobRunner
|
|||
* @return the file path to the pre-exec.
|
||||
*/
|
||||
private def writeExec() = {
|
||||
IOUtils.writeTempFile(function.commandLine, ".exec", "", function.commandDirectory)
|
||||
IOUtils.writeTempFile(function.commandLine, ".exec", "")
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -185,7 +185,7 @@ class LsfJobRunner(val function: CommandLineFunction) extends DispatchJobRunner
|
|||
mountCommand(function).foreach(command =>
|
||||
preExec.append("%s%n".format(command)))
|
||||
|
||||
IOUtils.writeTempFile(preExec.toString, ".preExec", "", function.commandDirectory)
|
||||
IOUtils.writeTempFile(preExec.toString, ".preExec", "")
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -211,6 +211,6 @@ class LsfJobRunner(val function: CommandLineFunction) extends DispatchJobRunner
|
|||
|fi
|
||||
|""".stripMargin.format(function.commandDirectory, touchDone, touchFail))
|
||||
|
||||
IOUtils.writeTempFile(postExec.toString, ".postExec", "", function.commandDirectory)
|
||||
IOUtils.writeTempFile(postExec.toString, ".postExec", "")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ object IOUtils {
|
|||
|
||||
def writeContents(file: File, content: String) = FileUtils.writeStringToFile(file, content)
|
||||
|
||||
def writeTempFile(content: String, prefix: String, suffix: String = "", directory: File) = {
|
||||
def writeTempFile(content: String, prefix: String, suffix: String = "", directory: File = null) = {
|
||||
val tempFile = absolute(File.createTempFile(prefix, suffix, directory))
|
||||
writeContents(tempFile, content)
|
||||
tempFile
|
||||
|
|
|
|||
Loading…
Reference in New Issue