Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

WIP

  • Loading branch information...
commit 5b955003a12a002bd71ad44e5b6f251fd951f6f1 1 parent 70ce599
Kevin Downey authored
Showing with 6 additions and 3 deletions.
  1. +2 −0  problems.org
  2. +4 −3 src/clojurebot/feed.clj
2  problems.org
View
@@ -19,3 +19,5 @@
plugin namespaces from that.
- actually, maybe first try at a new plugin will be a hudson BUILD
IT NOW plugin
+ - build it now plugin for hudson done
+
7 src/clojurebot/feed.clj
View
@@ -17,7 +17,6 @@
(xml/parse)
(tree-seq map? (comp seq :content))))
-
(defn find-tag [tag top]
(->> top :content (filter #(= tag (:tag %))) first))
@@ -51,6 +50,8 @@
(filter #(= :entry (:tag %)))
(map entry->map)))
+(def last-seen 500)
+
(defonce ^{:private true} entry-cache (atom {}))
(defn atom-pull*
@@ -65,7 +66,7 @@
seen-ids)
new-entries (reverse (filter (comp new-ids :id) latest-entries))]
(swap! entry-cache
- update-in [key] (comp set #(take 100 %) #(into % new-ids) set))
+ update-in [key] (comp set #(take last-seen %) #(into % new-ids) set))
(if ids
(first new-entries)
new-entries))))
@@ -85,7 +86,7 @@
seen-ids)
new-entries (reverse (filter (comp new-ids :id) latest-entries))]
(swap! entry-cache
- update-in [url] (comp set #(take 100 %) #(into % new-ids) set))
+ update-in [url] (comp set #(take last-seen %) #(into % new-ids) set))
(if ids
(first new-entries)
(reduce #(str %1 %2 "\n") nil (take 5 new-entries)))))
Please sign in to comment.
Something went wrong with that request. Please try again.