Skip to content

Commit

Permalink
proto default for read as well
Browse files Browse the repository at this point in the history
  • Loading branch information
alexy committed Jul 14, 2010
1 parent 918a08e commit 89dae95
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/invert.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
3 changes: 2 additions & 1 deletion src/tokyo-graph.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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)})))
Expand Down

0 comments on commit 89dae95

Please sign in to comment.