aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ravanan/command-line-tool.scm33
-rw-r--r--ravanan/workflow.scm2
2 files changed, 23 insertions, 12 deletions
diff --git a/ravanan/command-line-tool.scm b/ravanan/command-line-tool.scm
index 8f269ff..1b23c7e 100644
--- a/ravanan/command-line-tool.scm
+++ b/ravanan/command-line-tool.scm
@@ -60,6 +60,9 @@
check-requirements
inherit-requirements
%command-line-tool-supported-requirements
+ scheduler-proc
+ scheduler-proc-name
+ scheduler-proc-cwl
single-machine-job-state
single-machine-job-state?
single-machine-job-state-script
@@ -99,6 +102,12 @@
(apply warning fmt args)
(exit #f))
+(define-immutable-record-type <scheduler-proc>
+ (scheduler-proc name cwl)
+ scheduler-proc?
+ (name scheduler-proc-name)
+ (cwl scheduler-proc-cwl))
+
(define-immutable-record-type <single-machine-job-state>
(single-machine-job-state script success?)
single-machine-job-state?
@@ -938,17 +947,19 @@ named @var{name} with @var{inputs} using tools from Guix manifest
#:key guix-daemon-socket
slurm-api-endpoint slurm-jwt)
(scheduler (match-lambda*
- (((name cwl) inputs)
- (run-command-line-tool name
- manifest
- cwl
- inputs
- scratch
- store
- batch-system
- #:guix-daemon-socket guix-daemon-socket
- #:slurm-api-endpoint slurm-api-endpoint
- #:slurm-jwt slurm-jwt)))
+ ((proc inputs)
+ (let ((name (scheduler-proc-name proc))
+ (cwl (scheduler-proc-cwl proc)))
+ (run-command-line-tool name
+ manifest
+ cwl
+ inputs
+ scratch
+ store
+ batch-system
+ #:guix-daemon-socket guix-daemon-socket
+ #:slurm-api-endpoint slurm-api-endpoint
+ #:slurm-jwt slurm-jwt))))
(lambda (state)
(guard (c ((job-failure? c)
(let ((script (job-failure-script c)))
diff --git a/ravanan/workflow.scm b/ravanan/workflow.scm
index b30c386..2ecc4e6 100644
--- a/ravanan/workflow.scm
+++ b/ravanan/workflow.scm
@@ -126,7 +126,7 @@ requirements and hints of the step."
"Convert @code{CommandLineTool} workflow @var{cwl} of @var{name} to a
propagator."
(propagator name
- (list name cwl)
+ (scheduler-proc name cwl)
(vector-map->list (lambda (input)
(cons (assoc-ref input "id")
(assoc-ref input "id")))