Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opening DB and reloading automatically when .mmdb updated #61

Open
arrfab opened this issue Jul 30, 2018 · 2 comments
Open

opening DB and reloading automatically when .mmdb updated #61

arrfab opened this issue Jul 30, 2018 · 2 comments

Comments

@arrfab
Copy link

arrfab commented Jul 30, 2018

Hi, not sure if that request should be considered an issue, or just some enhancement in the documentation instead. For "legacy" maxmind DB, there was a way to specify some "options", like GeoIP.GEOIP_CHECK_CACHE to force verifying that if underlying DB was changed, it would reopen it automatically , instead of having a relaunch the .py script that has the pointer to the DB.

I don't see option being described in doc, so was wondering what would be the option. help(geoip2.database) seems to have some params, like :
MODE_AUTO = 0
MODE_FD = 16
MODE_FILE = 4
MODE_MEMORY = 8
MODE_MMAP = 2
MODE_MMAP_EXT = 1

But I don't know which one would do what I'd need : some py process running in background, and detecting if .mmdb file was changed and would reload it (like GeoIP.GEOIP_CHECK_CACHE was doing for legacy geoip)

@oschwald
Copy link
Member

This library doesn't currently support automatic reloading of the database.

@arrfab
Copy link
Author

arrfab commented Jul 30, 2018

Thanks for the answer .. so is that a case for a RFE then ? as I was using that feature with the "legacy" python-GeoIP pkg, I tried to find the same features level with the new python library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants