Commit 023033c4 authored by Jens Korinth's avatar Jens Korinth
Browse files

Slurm scalastyle fix

parent c96cb0e8
......@@ -15,6 +15,7 @@ import java.nio.file.attribute.PosixFilePermission._
**/
final object Slurm extends Publisher {
private implicit val logger = de.tu_darmstadt.cs.esa.tapasco.Logging.logger(getClass)
private val SLURM_RETRIES = 10
/** Model of a SLURM job. */
final case class Job(
......@@ -113,7 +114,8 @@ final object Slurm extends Publisher {
* @param script Job script file to schedule via `sbatch`.
* @return Either a positive integer (SLURM id), or an Exception.
**/
def apply(script: Path, retries: Int = 10): Option[Int] = catchAllDefault[Option[Int]](None, "Slurm scheduling failed: ") {
def apply(script: Path, retries: Int = SLURM_RETRIES): Option[Int] =
catchAllDefault[Option[Int]](None, "Slurm scheduling failed: ") {
val cmd = "sbatch %s".format(script.toAbsolutePath().normalize().toString)
logger.debug("running slurm batch job: '%s'".format(cmd))
val res = cmd.!!
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment