summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/mumi.in48
1 files changed, 19 insertions, 29 deletions
diff --git a/scripts/mumi.in b/scripts/mumi.in
index 2b1f70f..02d8af4 100644
--- a/scripts/mumi.in
+++ b/scripts/mumi.in
@@ -56,35 +56,25 @@
"Failed to index `~a'~%" (%config 'mail-dir)))))))
(define update-state!
- (let ((count 0))
- (lambda _
- (catch #t
- (lambda ()
- (when (zero? count)
- (format (current-error-port) "Full refresh!~%"))
- (let ((nums (sort
- (append-map (lambda (package)
- (soap-invoke*
- (%config 'debbugs)
- get-bugs
- `((package . ,package)
- (archive . ,(if (zero? count)
- 'both
- 0)))))
- (%config 'packages)) >)))
- (update-mboxes! nums)
- (mu-index)
- (update-bug-database! nums)
- (set! count (modulo (1+ count) 100)))
- (format (current-error-port)
- "Sleeping for ~a seconds.~%" %update-interval)
- (sleep %update-interval)
- (update-state!))
- (lambda args
- (format (current-error-port) "worker error: ~a~%" args)
- (set! count (modulo (1+ count) 100))
- (sleep %update-interval)
- (update-state!))))))
+ (lambda _
+ (catch #t
+ (lambda ()
+ (let ((nums (sort (append-map (lambda (package)
+ (soap-invoke* (%config 'debbugs)
+ get-bugs
+ `((package . ,package))))
+ (%config 'packages)) >)))
+ (update-mboxes! nums)
+ (mu-index)
+ (update-bug-database! nums))
+ (format (current-error-port)
+ "Sleeping for ~a seconds." %update-interval)
+ (sleep %update-interval)
+ (update-state!))
+ (lambda args
+ (format (current-error-port) "worker error: ~a~%" args)
+ (sleep %update-interval)
+ (update-state!)))))
(define %options
;; Specifications of the command-line options