--- a/project.clj Mon Oct 03 21:28:10 2011 -0400
+++ b/project.clj Mon Oct 03 21:30:31 2011 -0400
@@ -7,5 +7,6 @@
[cheshire "2.0.2"]
[clj-http "0.2.1"]
[aleph "0.2.0-beta2"]]
- :main newseasons.server)
+ :main newseasons.server
+ :run-aliases {:refresh newseasons.loops.refresh/main})
--- a/src/newseasons/loops/refresh.clj Mon Oct 03 21:28:10 2011 -0400
+++ b/src/newseasons/loops/refresh.clj Mon Oct 03 21:30:31 2011 -0400
@@ -6,8 +6,8 @@
(defn- refresh-show [id]
(println " refreshing" id)
(let [show (itunes/itunes-lookup-seasons id)]
- (println show)
- (println " ->" (show "artistName"))
+ (when show
+ (println " ->" (show "artistName")))
(Thread/sleep 5000)))
(defn- refresh []
@@ -18,5 +18,5 @@
(defn main [& args]
(println "Starting Refresh Loop!")
- (println)
+ (println "----------------------")
(dorun (repeatedly refresh)))