Merge pull request #760 from broadinstitute/ks_queue_patches

Queue patches
This commit is contained in:
droazen 2014-10-23 14:52:26 -04:00
commit 37464c38f2
2 changed files with 12 additions and 4 deletions

View File

@ -36,7 +36,7 @@ import org.ggf.drmaa.Session
class GridEngineJobRunner(session: Session, function: CommandLineFunction) extends DrmaaJobRunner(session, function) with Logging { class GridEngineJobRunner(session: Session, function: CommandLineFunction) extends DrmaaJobRunner(session, function) with Logging {
// Grid Engine disallows certain characters from being in job names. // Grid Engine disallows certain characters from being in job names.
// This replaces all illegal characters with underscores // This replaces all illegal characters with underscores
protected override val jobNameFilter = """[\n\t\r/:,@\\*?]""" protected override val jobNameFilter = """[\s/:,@\\*?]"""
protected override val minRunnerPriority = -1023 protected override val minRunnerPriority = -1023
protected override val maxRunnerPriority = 0 protected override val maxRunnerPriority = 0

View File

@ -33,14 +33,22 @@ import io.Source
* A collection of various system utilities. * A collection of various system utilities.
*/ */
object SystemUtils extends Logging { object SystemUtils extends Logging {
val inetAddress = InetAddress.getLocalHost.getHostAddress private val localAddress = {
val canonicalHostName = InetAddress.getLocalHost.getCanonicalHostName try {
InetAddress.getLocalHost
} catch {
case e: Exception =>
InetAddress.getLoopbackAddress
}
}
val inetAddress = localAddress.getHostAddress
val canonicalHostName = localAddress.getCanonicalHostName
val hostName = { val hostName = {
if (canonicalHostName != inetAddress) if (canonicalHostName != inetAddress)
canonicalHostName canonicalHostName
else else
InetAddress.getLocalHost.getHostName localAddress.getHostName
} }
val mailName = { val mailName = {