summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2020-05-10 16:09:26 +0200
committerRicardo Wurmus <rekado@elephly.net>2020-05-10 16:09:26 +0200
commit13ba003922eee0cf8641d498d7f3205c811c3561 (patch)
tree484c0a2e146a3e6ba9b9654cf08319c989550871
parent8e87df58751aff11ba0c54a083e491eea2e8b914 (diff)
Replace invocation of remote get-status operation with bug-status.
-rw-r--r--mumi/bugs.scm3
-rw-r--r--mumi/messages.scm12
2 files changed, 3 insertions, 12 deletions
diff --git a/mumi/bugs.scm b/mumi/bugs.scm
index fc9601c..ea85ca2 100644
--- a/mumi/bugs.scm
+++ b/mumi/bugs.scm
@@ -18,7 +18,6 @@
(define-module (mumi bugs)
#:use-module (mumi config)
#:use-module (mumi debbugs)
- #:use-module (debbugs)
#:use-module (sqlite3)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-11)
@@ -230,7 +229,7 @@ tags=excluded.tags;")
;; Process bugs in chunks
(let loop ((lst bug-nums))
(let-values (((chunk tail) (safe-split lst chunk-size)))
- (let ((bugs (soap-invoke* (%config 'debbugs) get-status chunk)))
+ (let ((bugs (map bug-status chunk)))
(for-each (lambda (bug)
(add-bug! (bug-num bug)
(bug-originator bug)
diff --git a/mumi/messages.scm b/mumi/messages.scm
index 92ff614..f816cae 100644
--- a/mumi/messages.scm
+++ b/mumi/messages.scm
@@ -27,8 +27,6 @@
#:use-module (ice-9 binary-ports)
#:use-module (ice-9 threads)
#:use-module (debbugs cache)
- #:use-module (debbugs soap)
- #:use-module (debbugs operations)
#:use-module (email email)
#:use-module (mumi config)
#:use-module (mumi debbugs)
@@ -53,7 +51,7 @@ yet. Return new results alongside cached results."
(uncached-ids (lset-difference eq?
ids
(map bug-num cached)))
- (new (soap-invoke* (%config 'debbugs) get-status uncached-ids)))
+ (new (filter-map bug-status uncached-ids )))
;; Cache new things
(map (lambda (bug) (cache! (bug-num bug) bug)) new)
;; Return everything from cache
@@ -185,13 +183,7 @@ Intersect the result with the id sets in the list SETS."
(status-with-cache (if (> (length filtered) max)
(take filtered max) filtered))))
-;; TODO: This returns *any* matching debbugs bug, even if it is not
-;; part of the default packages.
-(define (fetch-bug id)
- "Return the bug matching ID or #F."
- (match (soap-invoke* (%config 'debbugs) get-status (list id))
- (() #f)
- ((bug) bug)))
+(define fetch-bug bug-status)
(define (recent-bugs amount)
"Return up to AMOUNT bugs with most recent activity."