Permalink
Browse files

Fully embrace foreman now :)

  • Loading branch information...
1 parent b9c0fb3 commit 070a15c45882095c00b9c4837bb7386017e84290 @tackley committed Nov 3, 2011
Showing with 27 additions and 43 deletions.
  1. +3 −1 .gitignore
  2. +5 −3 Procfile
  3. 0 {dashboard → }/build.sbt
  4. +0 −2 dashboard/.gitignore
  5. +0 −10 dashboard/readme.md
  6. 0 {dashboard → }/project/build.properties
  7. 0 {dashboard → }/project/plugins.sbt
  8. +11 −2 publisher.rb
  9. +0 −14 publisher2.rb
  10. 0 {dashboard → }/src/main/scala/bootstrap/liftweb/Boot.scala
  11. 0 {dashboard → }/src/main/scala/dashboard/comet/TopHitsServer.scala
  12. 0 {dashboard → }/src/main/scala/dashboard/lib/Backend.scala
  13. 0 {dashboard → }/src/main/scala/dashboard/lib/Calculator.scala
  14. 0 {dashboard → }/src/main/scala/dashboard/lib/Event.scala
  15. 0 {dashboard → }/src/main/scala/dashboard/lib/EventListener.scala
  16. +2 −2 {dashboard → }/src/main/scala/dashboard/lib/MqReader.scala
  17. 0 {dashboard → }/src/main/scala/dashboard/lib/TopHits.scala
  18. 0 {dashboard → }/src/main/scala/dashboard/snippet/DataAge.scala
  19. 0 {dashboard → }/src/main/scala/dashboard/snippet/Detail.scala
  20. 0 {dashboard → }/src/main/webapp/WEB-INF/web.xml
  21. BIN {dashboard → }/src/main/webapp/arrow-3D-green-down.jpg
  22. 0 {dashboard → }/src/main/webapp/details.html
  23. BIN {dashboard → }/src/main/webapp/down_arrow_icon.png
  24. BIN {dashboard → }/src/main/webapp/gdn.gif
  25. 0 {dashboard → }/src/main/webapp/index.html
  26. BIN {dashboard → }/src/main/webapp/new_entry_icon.png
  27. 0 {dashboard → }/src/main/webapp/static/bootstrap-1.3.0.min.css
  28. 0 {dashboard → }/src/main/webapp/static/stats.css
  29. 0 {dashboard → }/src/main/webapp/top10.html
  30. 0 {dashboard → }/src/main/webapp/top20.html
  31. BIN {dashboard → }/src/main/webapp/up_arrow_icon.png
  32. 0 {dashboard → }/src/test/scala/dashboard/ZeroMqTest.scala
  33. +0 −4 start_app.sh
  34. +6 −1 start_pub.sh
  35. +0 −4 start_pub2.sh
View
@@ -1 +1,3 @@
-/Procfile~
+*~
+target/
+.idea*/
View
@@ -1,4 +1,6 @@
-listenerguweb01: ./start_pub.sh
-listenerguweb51: ./start_pub2.sh
-webapp: ./start_app.sh
+webapp: ./sbt run
+listenerguweb01: ./start_pub.sh guweb01
+listenerguweb51: ./start_pub.sh guweb51
+
+
File renamed without changes.
View
@@ -1,2 +0,0 @@
-target/
-.idea*/
View
@@ -1,10 +0,0 @@
-Note: this app requires the 0mq native binaries installed.
-
-Either:
-
- sudo apt-get install libzmq0 libzmq-dev
-
-or for you mac users:
-
- brew install zeromq
-
File renamed without changes.
File renamed without changes.
View
@@ -3,12 +3,21 @@
require 'rubygems'
require 'zmq'
+unless ARGV.length == 1
+ puts "usage: publisher.rb port"
+ exit
+end
+
+port = ARGV[0]
+
+puts "Publishing on port #{port}..."
+
context = ZMQ::Context.new(1)
publisher = context.socket(ZMQ::PUB)
publisher.setsockopt(ZMQ::HWM, 10);
-publisher.bind("tcp://*:5536")
+publisher.bind("tcp://*:#{port}")
-ARGF.each_line do |l|
+STDIN.each_line do |l|
publisher.send(l)
end
View
@@ -1,14 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'rubygems'
-require 'zmq'
-
-context = ZMQ::Context.new(1)
-publisher = context.socket(ZMQ::PUB)
-publisher.setsockopt(ZMQ::HWM, 10);
-publisher.bind("tcp://*:5537")
-
-ARGF.each_line do |l|
- publisher.send(l)
-end
-
@@ -18,8 +18,8 @@ class MqReader(actor: ActorRef) {
val context = ZMQ.context(1)
val sub = context.socket(ZMQ.SUB)
- sub.connect("tcp://localhost:5536")
- sub.connect("tcp://localhost:5537")
+ sub.connect("tcp://localhost:5100")
+ sub.connect("tcp://localhost:5200")
sub.subscribe(Array.empty)
sub.setHWM(50)
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -1,4 +0,0 @@
-#!/bin/bash
-
-cd dashboard
-../sbt run
View
@@ -1,4 +1,9 @@
#!/bin/bash
-ssh devsuprt@guweb01 "nice tail -f /apache2/logs/guardian-access_log" | ./publisher.rb
+SERVER=$1
+PORT=${PORT:-5100}
+
+echo "Connecting to server $SERVER, republishing on port $PORT"
+
+ssh devsuprt@$SERVER "nice tail -f /apache2/logs/guardian-access_log" | ./publisher.rb $PORT
View
@@ -1,4 +0,0 @@
-#!/bin/bash
-
-ssh devsuprt@guweb51 "nice tail -f /apache2/logs/guardian-access_log" | ./publisher2.rb
-

0 comments on commit 070a15c

Please sign in to comment.