messages: Remove update-mboxes!.
authorRicardo Wurmus <rekado@elephly.net>
Wed, 22 Apr 2020 08:29:15 +0000 (10:29 +0200)
committerRicardo Wurmus <rekado@elephly.net>
Wed, 22 Apr 2020 08:30:13 +0000 (10:30 +0200)
mumi/messages.scm
scripts/mumi.in

index ec36f7fe120a4f021fa06015f4a6195cd6eabc4e..d93cefd1f090188aab5cff22ebe055f02a7ac95a 100644 (file)
@@ -42,7 +42,6 @@
             wishlist-bugs
             bugs-by-severity
 
-            update-mboxes!
             bug-id->log-file
 
             multipart-message?
@@ -228,29 +227,6 @@ the difference by providing the current file size as an offset."
               file-name)
             #f)))))
 
-(define (update-mboxes! bug-nums)
-  (par-for-each (lambda (bug-num i)
-                  (format (current-error-port)
-                          "[~a/~a] Refreshing mbox of bug ~a...~%"
-                          i (length bug-nums) bug-num)
-                  (force-output (current-error-port))
-                  (parameterize ((current-error-port (%make-void-port OPEN_WRITE)))
-                    (and=> (download-mbox bug-num)
-                           (lambda (mbox)
-                             ;; Split into several files for indexing with mumimu
-                             (let ((mails
-                                    (call-with-input-file mbox mbox->emails)))
-                               (map (lambda (mail index)
-                                      (with-output-to-file
-                                          (format #f "~a/cur/~a-~a"
-                                                  (%config 'mail-dir) bug-num index)
-                                        (lambda ()
-                                          (put-bytevector (current-output-port) mail))))
-                                    mails
-                                    (iota (length mails) 1)))))))
-                bug-nums
-                (iota (length bug-nums) 1)))
-
 ;; We would like to use get-bug-log here, but it often returns
 ;; truncated messages.  This is a known bug upstream.
 (define-public (patch-messages bug-id)
index 9dd8980f7d261cc69c8fcf959d048a9e00c100da..3a55ed9f7c23e7f568cb9202754267bcf0e115b3 100644 (file)
@@ -64,7 +64,6 @@
                                                       get-bugs
                                                       `((package . ,package))))
                                       (%config 'packages)) >)))
-          (update-mboxes! nums)
           (update-bug-database! nums))
         (format (current-error-port)
                 "Sleeping for ~a seconds." %update-interval)
                                `((package . ,package)
                                  (archive . both))))
                             (%config 'packages)) >)))
-     (update-mboxes! nums)
      (update-bug-database! nums)))
   (("worker")
    (update-state!))