mirror of
https://github.com/MillironX/nf-configs.git
synced 2024-11-25 17:29:55 +00:00
Wrap sinfo call in a try/catch and default to rackham on failure
This commit is contained in:
parent
fa1b4cb412
commit
be6ea0060f
1 changed files with 6 additions and 1 deletions
|
@ -9,7 +9,12 @@ singularity {
|
|||
enabled = true
|
||||
}
|
||||
|
||||
def hostname = "sinfo --local -N -h | head -1 | cut -f1 -d' ' ".execute().text.trim()
|
||||
def hostname = "r1"
|
||||
try {
|
||||
hostname = "sinfo --local -N -h | head -1 | cut -f1 -d' ' ".execute().text.trim()
|
||||
} catch (java.io.IOException e) {
|
||||
System.err.println("WARNING: Could not run sinfo to determine current cluster, defaulting to rackham")
|
||||
}
|
||||
|
||||
// closure to create a suitable clusterOptions
|
||||
def clusterOptionsCreator = { m ->
|
||||
|
|
Loading…
Reference in a new issue