Skip to content

Commit

Permalink
Fully embrace foreman now :)
Browse files Browse the repository at this point in the history
  • Loading branch information
tackley committed Nov 3, 2011
1 parent b9c0fb3 commit 070a15c
Show file tree
Hide file tree
Showing 35 changed files with 27 additions and 43 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/Procfile~
*~
target/
.idea*/
8 changes: 5 additions & 3 deletions Procfile
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 0 additions & 2 deletions dashboard/.gitignore

This file was deleted.

10 changes: 0 additions & 10 deletions dashboard/readme.md

This file was deleted.

File renamed without changes.
File renamed without changes.
13 changes: 11 additions & 2 deletions publisher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

14 changes: 0 additions & 14 deletions publisher2.rb

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
4 changes: 0 additions & 4 deletions start_app.sh

This file was deleted.

7 changes: 6 additions & 1 deletion start_pub.sh
Original file line number Diff line number Diff line change
@@ -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

4 changes: 0 additions & 4 deletions start_pub2.sh

This file was deleted.

0 comments on commit 070a15c

Please sign in to comment.