Permalink
Browse files

proto default for read as well

  • Loading branch information...
1 parent 918a08e commit 89dae9555b81a6da6f59c7a24c93c22b42c5ae4b @alexy committed Jul 14, 2010
Showing with 8 additions and 3 deletions.
  1. +6 −2 src/invert.clj
  2. +2 −1 src/tokyo-graph.clj
View
@@ -4,5 +4,9 @@
(reduce (fn [inv [to dates]] (update-in inv [to from] #(into (or % []) dates))) inv reps))
{} reps))
-;; (time (def dments (invert-graph dreps)))
-(time (tokyo-agents-write-reps dments "dments.clb"))
+
+;; (time (do (def dreps (->> (tokyo (map (fn [[k v]] [k (into (sorted-map) v)])) (into {})))
+;; ))
+
+;; (time (def dments (invert-graph dreps)))
+;; (time (tokyo-agents-write-reps dments "dments.clb"))
View
@@ -11,8 +11,9 @@
(defn errln [ & args]
(doto System/err (.println (apply str args)) .flush))
-(defn tokyo-read-reps [proto db-pathname & [str-load?]]
+(defn tokyo-read-reps [db-pathname & [proto str-load?]]
(let [
+ proto (or proto Repliers)
init-params (let [par {:path db-pathname :read-only true}]
(if str-load? par
(merge par {:dump protobuf-dump :load (partial protobuf-load proto)})))

0 comments on commit 89dae95

Please sign in to comment.