Skip to content

Commit fbdf019

Browse files
author
Pedro Axelrud
committed
now geoip is load in memory.. the tests are pretty slower, but in prod should be much better
1 parent fcb371d commit fbdf019

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ gem "eventmachine", "~>0.12.10"
44
gem "eventmachine-tail", "~> 0.6.3"
55
gem "pg"
66
gem "user_agent_info", "0.0.1", :git => '[email protected]:joaomilho/user_agent_info.git'
7-
gem "mocha", :require => false
87
gem "geoip-c", "~> 0.8.0"
98

9+
# aptitude install geoip-bin geoip-database libgeoip-dev

src/mailee/stats.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def initialize(path, startpos=-1)
99
@config = YAML.load_file('config.yml')
1010
raise 'Could not load config.yml' unless @config
1111
@conn = PGconn.open(@config['database'])
12-
@geoip = GeoIP::City.new('GeoLiteCity.dat', :filesystem, true)
12+
@geoip = GeoIP::City.new('GeoLiteCity.dat', :memory, true)
1313
end
1414

1515
def receive_data(data)

0 commit comments

Comments
 (0)