Commits

Ning Sun committed 5c35f7d

update demos

Comments (0)

Files changed (7)

 /pom.xml
 *jar
 /lib
-/classes
+*/classes
 /native
 /.lein-failures
 /checkouts

slacker-client-demo/project.clj

 (defproject slacker-client-demo "1.0.0-SNAPSHOT"
   :description "FIXME: write description"
   :dependencies [[org.clojure/clojure "1.2.1"]
-                 [slacker "0.6.0-SNAPSHOT"]])
+                 [slacker "0.7.0-SNAPSHOT"]]
+  :main slacker-client-demo.core)
 

slacker-client-demo/src/slacker_client_demo/client.clj

 (ns slacker-client-demo.client
   (:use [slacker.client]))
 
-(def scp (slackerc-pool "127.0.0.1:6565"))
+(def scp (slackerc "127.0.0.1:6565"))
 
 

slacker-server-demo/.lein-deps-sum

-f9e5b8ee173288a90487997e59db59f2d55d2ce9
+1fd06469b6cb4e3ee5bbd4c52931b4943e726911

slacker-server-demo/project.clj

 (defproject redday "1.0.0-SNAPSHOT"
   :description "FIXME: write description"
   :dependencies [[org.clojure/clojure "1.2.1"]
-                 [slacker "0.6.0-SNAPSHOT"]
+                 [slacker "0.7.0-SNAPSHOT"]
                  [reddit.clj "0.3.2"]
-                 [clojure-opennlp "0.1.7"]])
+                 [clojure-opennlp "0.1.7"]]
+  :main redday.core)

slacker-server-demo/resources/log4j.properties

+### the default log4j configuration to suppress warning ###
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.Target=System.out
+log4j.appender.stdout.layout=org.apache.log4j.SimpleLayout
+log4j.rootLogger=info, stdout

slacker-server-demo/src/redday/core.clj

 (ns redday.core
   (:require [redday stats api])
   (:use [slacker.server])
-  (:use [slacker.interceptors.exectime :only [exectime-stats]]))
+  (:use [slacker.interceptor])
+  (:use [slacker.interceptors.exectime :only [exectime-stats]])
+  (:use [slacker.interceptors.slowwatchdog :only [slow-watch-dog]]))
 
 (defn -main [& args]
   (start-slacker-server [(the-ns 'redday.stats)
                          (the-ns 'redday.api)]
                         6565
-                        :interceptors exectime-stats))
+                        :interceptors (interceptors [exectime-stats
+                                                     (slow-watch-dog 1000)])))
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.