aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ravanan/command-line-tool.scm12
1 files changed, 8 insertions, 4 deletions
diff --git a/ravanan/command-line-tool.scm b/ravanan/command-line-tool.scm
index f093093..65b001e 100644
--- a/ravanan/command-line-tool.scm
+++ b/ravanan/command-line-tool.scm
@@ -438,10 +438,14 @@ path."
(or (assoc-ref cwl "hints")
#())))
(cpus (from-maybe
- (maybe-let* ((cores-min (maybe-assoc-ref (find-requirement requirements
- "ResourceRequirement")
- "coresMin")))
- (just (inexact->exact (ceiling (coerce-type cores-min 'number)))))
+ (maybe-bind (maybe-assoc-ref (find-requirement requirements
+ "ResourceRequirement")
+ "coresMin")
+ (compose just
+ inexact->exact
+ ceiling
+ (cut coerce-type <> 'number)
+ (cut coerce-expression-local <> inputs)))
1))
(store-files-directory (script->store-files-directory script store))
(store-data-file (script->store-data-file script store))