Replace couchbase counters with drb version

This commit is contained in:
2014-08-05 17:49:16 +02:00
parent c0c25673bf
commit 99a9536c68
20 changed files with 400 additions and 282 deletions
+13
View File
@@ -0,0 +1,13 @@
#!/usr/bin/env ruby
# Make drb server
require 'rubygems'
require File.expand_path('../lib/in_memory_q_counter', File.dirname(__FILE__))
require 'drb'
require 'daemons'
drb_port = 9022
puts "Counter server running at port #{drb_port}"
Daemons.run_proc('DRBcounter', dir_mode: :normal, dir: File.expand_path("#{File.dirname(__FILE__)}/../tmp/pids")) do
DRb.start_service "druby://:#{drb_port}", InMemoryQCounter.new
# trap("INT") { DRb.stop_service }
DRb.thread.join
end