]> git.elephly.net Git - software/mumi.git/commitdiff
messages: bugs-by-severity: Use local database.
authorRicardo Wurmus <rekado@elephly.net>
Thu, 12 Mar 2020 09:59:38 +0000 (10:59 +0100)
committerRicardo Wurmus <rekado@elephly.net>
Thu, 12 Mar 2020 09:59:38 +0000 (10:59 +0100)
* mumi/messages.scm (bugs-by-severity): Use local database instead of
contacting Debbugs.

mumi/messages.scm

index 89536bfec86764875e61bedbe9724aee0b3545d0..be3369cfce751521791a65e1378f05bc0fe25898 100644 (file)
@@ -233,12 +233,11 @@ result for a while."
 
 (define* (bugs-by-severity severity #:optional status)
   "Return severe bugs."
-  (let* ((ids
-          (soap-invoke* (%config 'debbugs)
-                        get-bugs
-                        `((package . "guix")
-                          (severity . ,severity)
-                          ,@(if status `((status . ,status)) '())))))
+  (let* ((severity-ids (db:bugs-by-severity severity))
+         (ids (if status
+                  (let ((status-ids (db:bugs-by-status status)))
+                    (lset-intersection eq? severity-ids status-ids))
+                  severity-ids)))
     (status-with-cache ids)))
 
 (define (ago unit amount)