mirror of
https://github.com/MillironX/nf-configs.git
synced 2024-11-22 08:29:54 +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
|
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
|
// closure to create a suitable clusterOptions
|
||||||
def clusterOptionsCreator = { m ->
|
def clusterOptionsCreator = { m ->
|
||||||
|
|
Loading…
Reference in a new issue