aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ravanan/command-line-tool.scm1
-rw-r--r--ravanan/slurm-api.scm14
2 files changed, 8 insertions, 7 deletions
diff --git a/ravanan/command-line-tool.scm b/ravanan/command-line-tool.scm
index 9541207..cbb81c4 100644
--- a/ravanan/command-line-tool.scm
+++ b/ravanan/command-line-tool.scm
@@ -559,6 +559,7 @@ path."
,store-data-file))
stdout-file
stderr-file
+ name
script
#:api-endpoint slurm-api-endpoint
#:jwt slurm-jwt)))
diff --git a/ravanan/slurm-api.scm b/ravanan/slurm-api.scm
index 6092b26..4ed02b5 100644
--- a/ravanan/slurm-api.scm
+++ b/ravanan/slurm-api.scm
@@ -62,15 +62,15 @@ document and pass in as the body of the HTTP request."
#:body (call-with-output-bytevector
(cut scm->json body-scm <>))))
-(define* (submit-job environment stdout-file stderr-file script
+(define* (submit-job environment stdout-file stderr-file name script
#:key api-endpoint jwt)
- "Submit job @var{script} to slurm via @var{api-endpoint} and
-authenticating using @var{jwt}. @var{environment} is an association
-list of environment variables to set in the job. @var{stdout-file} and
-@var{stderr-file} are files in which to write the stdout and stderr of
-the job respectively."
+ "Submit job named @var{name} running @var{script} to slurm via @var{api-endpoint}
+and authenticating using @var{jwt}. @var{environment} is an association list of
+environment variables to set in the job. @var{stdout-file} and @var{stderr-file}
+are files in which to write the stdout and stderr of the job respectively."
(define job-spec
- `(("script" . ,(string-append "#!/bin/bash\n" script))
+ `(("name" . ,name)
+ ("script" . ,(string-append "#!/bin/bash\n" script))
("environment" . ,(list->vector
(map (match-lambda
((name . value)