From 2a7f54ee31e0d742d1207721cf034ea04d40ae43 Mon Sep 17 00:00:00 2001 From: Jorge Aguilera Date: Mon, 15 Jul 2024 18:11:40 +0200 Subject: [PATCH] move contraintsbuilder to model Signed-off-by: Jorge Aguilera --- .../src/main/nextflow/nomad/executor/NomadService.groovy | 1 + .../nomad/{executor => models}/ConstraintsBuilder.groovy | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) rename plugins/nf-nomad/src/main/nextflow/nomad/{executor => models}/ConstraintsBuilder.groovy (96%) diff --git a/plugins/nf-nomad/src/main/nextflow/nomad/executor/NomadService.groovy b/plugins/nf-nomad/src/main/nextflow/nomad/executor/NomadService.groovy index bc9ca50..21cc80c 100644 --- a/plugins/nf-nomad/src/main/nextflow/nomad/executor/NomadService.groovy +++ b/plugins/nf-nomad/src/main/nextflow/nomad/executor/NomadService.groovy @@ -22,6 +22,7 @@ import groovy.util.logging.Slf4j import io.nomadproject.client.ApiClient import io.nomadproject.client.api.JobsApi import io.nomadproject.client.model.* +import nextflow.nomad.models.ConstraintsBuilder import nextflow.nomad.models.JobConstraints import nextflow.nomad.config.NomadConfig import nextflow.nomad.models.JobVolume diff --git a/plugins/nf-nomad/src/main/nextflow/nomad/executor/ConstraintsBuilder.groovy b/plugins/nf-nomad/src/main/nextflow/nomad/models/ConstraintsBuilder.groovy similarity index 96% rename from plugins/nf-nomad/src/main/nextflow/nomad/executor/ConstraintsBuilder.groovy rename to plugins/nf-nomad/src/main/nextflow/nomad/models/ConstraintsBuilder.groovy index bfd187b..3659f31 100644 --- a/plugins/nf-nomad/src/main/nextflow/nomad/executor/ConstraintsBuilder.groovy +++ b/plugins/nf-nomad/src/main/nextflow/nomad/models/ConstraintsBuilder.groovy @@ -1,4 +1,4 @@ -package nextflow.nomad.executor +package nextflow.nomad.models import io.nomadproject.client.model.Constraint import nextflow.nomad.models.JobConstraintsAttr @@ -7,7 +7,7 @@ import nextflow.nomad.models.JobConstraints class ConstraintsBuilder { - protected static List constraintsSpecToList(JobConstraints spec){ + static List constraintsSpecToList(JobConstraints spec){ def constraints = [] as List if( spec?.nodeSpecs ){ def nodes = spec.nodeSpecs