string keys are stored as strings.
This commit is contained in:
+16
-8
@@ -130,7 +130,8 @@
|
||||
|
||||
(define (get-deleted)
|
||||
(let ((count (store-count db-store))
|
||||
(k 0))
|
||||
(k 0)
|
||||
(last-perc 0))
|
||||
(let ((keys (store-keys db-store)))
|
||||
(map (λ (key)
|
||||
(let ((info (store-ref db-store key)))
|
||||
@@ -139,7 +140,8 @@
|
||||
(filter (λ (key)
|
||||
(set! k (+ k 1))
|
||||
(let ((perc (quotient (* k 100) count)))
|
||||
(when (= (remainder perc 10) 0)
|
||||
(when (and (= (remainder perc 10) 0) (> perc last-perc))
|
||||
(set! last-perc perc)
|
||||
(info-am "get-deleteed: ~a%" perc)))
|
||||
(let ((v (store-ref db-store key)))
|
||||
(eq? (hash-ref v 'file-db) 'unknown)))
|
||||
@@ -147,14 +149,20 @@
|
||||
)
|
||||
|
||||
(let* ((walker-count 0)
|
||||
(last-commit-s (current-seconds))
|
||||
(fw (make-file-walker base-path "*"
|
||||
(λ (base-path path info)
|
||||
(cond
|
||||
((= walker-count 0)
|
||||
(store-begin db-store))
|
||||
((= (remainder walker-count 250) 0)
|
||||
(store-commit db-store)
|
||||
(store-begin db-store))
|
||||
(let ((tm (current-seconds)))
|
||||
(cond
|
||||
((= walker-count 0)
|
||||
(store-begin db-store))
|
||||
((or (= (remainder walker-count 250) 0)
|
||||
(> (- tm last-commit-s) 5))
|
||||
(store-commit db-store)
|
||||
(store-begin db-store)
|
||||
(set! last-commit-s tm)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! walker-count (+ walker-count 1))
|
||||
(let-values (((base-path* path* info*) (file-admin base-path path info)))
|
||||
|
||||
Reference in New Issue
Block a user