Replace couchbase counters with drb version
This commit is contained in:
Executable
+13
@@ -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
|
||||
Reference in New Issue
Block a user