maxminddb icon indicating copy to clipboard operation
maxminddb copied to clipboard

Read in batches

Open nirname opened this issue 1 year ago • 0 comments

I have a bunch of IP addresses. It is too expensive to get geographical information for them all one by one. Is there a way to read them in a batch?

client = ::MaxMindDB.new(Rails.root.join('geolite.mmdb'))
client.lookup(*[192.158.1.38, 192.158.1.39]) # splat args
client.lookup([192.158.1.38, 192.158.1.39]) # maybe use and array directly

nirname avatar May 08 '24 14:05 nirname