Permalink
Browse files

Log content html

  • Loading branch information...
1 parent c2731b4 commit 511bdda58fcfc7786ead54355eb3dfeb47622e26 @swaroopch committed Jul 28, 2013
Showing with 15 additions and 1 deletion.
  1. +13 −0 src/isbnnetinclj2/mongo.clj
  2. +2 −1 src/isbnnetinclj2/store.clj
@@ -42,3 +42,16 @@
(mc/insert-and-return
data-collection
data))
+
+
+(def content-collection "content")
+
+
+(defn save-content
+ [isbn store content]
+ (mc/insert-and-return
+ content-collection
+ {:isbn isbn
+ :when (time/now)
+ :store store
+ :content content}))
@@ -208,7 +208,8 @@
(swap! book-data-cache assoc-in [isbn :price store] (:price details))
(when (:info details)
(swap! book-data-cache assoc-in [isbn :info] (:info details)))
- ;; TODO Log :content into MongoDB
+ (when (:content details)
+ (mongo/save-content isbn store (:content details)))
true)
(catch Exception x
(do

0 comments on commit 511bdda

Please sign in to comment.