Don't load geoip db in parallel
This commit is contained in:
parent
e8af5db2e8
commit
4351af35f4
1 changed files with 2 additions and 1 deletions
|
@ -11,6 +11,7 @@ import urllib.parse
|
|||
|
||||
import gevent
|
||||
|
||||
import util
|
||||
from Config import config
|
||||
from Plugin import PluginManager
|
||||
from Debug import Debug
|
||||
|
@ -629,6 +630,7 @@ class UiWebsocketPlugin(object):
|
|||
loc_cache[ip] = loc
|
||||
return loc
|
||||
|
||||
@util.Noparallel()
|
||||
def getGeoipDb(self):
|
||||
db_name = 'GeoLite2-City.mmdb'
|
||||
|
||||
|
@ -658,7 +660,6 @@ class UiWebsocketPlugin(object):
|
|||
self.log.debug("Not showing peer locations: no GeoIP database")
|
||||
return False
|
||||
|
||||
self.log.info("Loading GeoIP database from: %s" % db_path)
|
||||
geodb = maxminddb.open_database(db_path)
|
||||
|
||||
peers = list(peers.values())
|
||||
|
|
Loading…
Reference in a new issue