[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: database: Fix limit parameter.
From: |
Mathieu Othacehe |
Subject: |
branch master updated: database: Fix limit parameter. |
Date: |
Tue, 20 Apr 2021 02:38:46 -0400 |
This is an automated email from the git hooks/post-receive script.
mothacehe pushed a commit to branch master
in repository guix-cuirass.
The following commit(s) were added to refs/heads/master by this push:
new 356ca8b database: Fix limit parameter.
356ca8b is described below
commit 356ca8beda4e1d9a2666abfe5cb4b0581798ce0e
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Tue Apr 20 08:38:09 2021 +0200
database: Fix limit parameter.
* src/cuirass/database.scm (db-get-jobs-history): Bind limit parameter.
---
src/cuirass/database.scm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/cuirass/database.scm b/src/cuirass/database.scm
index d04a60a..3cab518 100644
--- a/src/cuirass/database.scm
+++ b/src/cuirass/database.scm
@@ -740,7 +740,8 @@ ORDER BY Jobs.name")
(#:name . ,name))
jobs))))))))
-(define* (db-get-jobs-history names #:key spec limit)
+(define* (db-get-jobs-history names
+ #:key spec (limit 10))
"Return the list of jobs from Jobs table which name is a member of the given
NAMES list, for the last LIMIT evaluations of SPEC specification."
(define (format-names names)
@@ -755,7 +756,8 @@ ORDER BY id DESC LIMIT :nr)
AND Jobs.name = ANY(:names);")
(params
`((#:spec . ,spec)
- (#:names . ,(format-names names)))))
+ (#:names . ,(format-names names))
+ (#:nr . ,limit))))
(let loop ((rows (exec-query/bind-params db query params))
(evaluations '()))
(match rows
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: database: Fix limit parameter.,
Mathieu Othacehe <=