summaryrefslogtreecommitdiff
path: root/scripts/mumi.in
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2020-04-07 16:11:50 +0200
committerRicardo Wurmus <rekado@elephly.net>2020-04-07 16:11:50 +0200
commitc85015dac8110bd7a4c37375b9eb05ebeadedf74 (patch)
treee9e782121f68f7c772d61fad3d5e3e9c9c3a6f76 /scripts/mumi.in
parent3386525ffc93ee099f5c1ebe45a42a4e83339ff6 (diff)
Revert "scripts: update-state!: Do a full refresh every 100 times."
This reverts commit 5c21d1deb3e534aedaaae4802423db0a5df041b0.
Diffstat (limited to 'scripts/mumi.in')
-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