diff options
author | Arun Isaac | 2024-10-25 15:57:04 +0100 |
---|---|---|
committer | Arun Isaac | 2024-11-06 00:37:10 +0000 |
commit | 8c3153b1161b2b6c74ff6316e7ada76128c7fefa (patch) | |
tree | bc9ef6880993012b6a726ec1357213e9c998d714 | |
parent | 38e282c2df130d6be3a47047d4dff2c623bb2d54 (diff) | |
download | ravanan-8c3153b1161b2b6c74ff6316e7ada76128c7fefa.tar.gz ravanan-8c3153b1161b2b6c74ff6316e7ada76128c7fefa.tar.lz ravanan-8c3153b1161b2b6c74ff6316e7ada76128c7fefa.zip |
slurm-api: Upgrade to API version 0.0.41.
* ravanan/slurm-api.scm (submit-job, job-state): Upgrade to API
version 0.0.41.
(job-state): Handle job_state as a vector of strings.
-rw-r--r-- | ravanan/slurm-api.scm | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ravanan/slurm-api.scm b/ravanan/slurm-api.scm index fa5614e..880eadb 100644 --- a/ravanan/slurm-api.scm +++ b/ravanan/slurm-api.scm @@ -93,7 +93,7 @@ FAQ}) to request for the job." (let ((response (slurm-http-post api-endpoint jwt - "/slurm/v0.0.39/job/submit" + "/slurm/v0.0.41/job/submit" `(("jobs" . #(,job-spec)))))) (match (json-ref response "errors") (#() @@ -109,16 +109,16 @@ authenticating using @var{jwt}. Return value is one of the symbols ;; jobs too. (let ((response (slurm-http-get api-endpoint jwt - (string-append "/slurm/v0.0.39/job/" + (string-append "/slurm/v0.0.41/job/" (number->string job-id))))) (match (json-ref response "errors") (#() - (string->symbol - (string-downcase - (json-ref (find (lambda (job) - (= (json-ref job "job_id") - job-id)) - (vector->list (json-ref response "jobs"))) - "job_state")))) + (match (json-ref (find (lambda (job) + (= (json-ref job "job_id") + job-id)) + (vector->list (json-ref response "jobs"))) + "job_state") + (#(job-state) + (string->symbol (string-downcase job-state))))) (#(errors ...) (error "Slurm API error" errors))))) |