aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2024-10-02 14:12:30 +0100
committerArun Isaac2024-10-02 14:12:30 +0100
commit04db71b6658c2acb88e84086df8604ad3df08fcd (patch)
tree4450735baa4d47af0bccd349554d3fa05db91e85
parentf2709c8cc4106372d31f42677bc086e69920b223 (diff)
downloadravanan-04db71b6658c2acb88e84086df8604ad3df08fcd.tar.gz
ravanan-04db71b6658c2acb88e84086df8604ad3df08fcd.tar.lz
ravanan-04db71b6658c2acb88e84086df8604ad3df08fcd.zip
command-line-tool: Coerce coresMin expressions.
* ravanan/command-line-tool.scm (run-command-line-tool): Coerce coresMin expressions.
-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))