Skip to content

Commit

Permalink
Merge pull request #83 from manics/load_server_settings_lock
Browse files Browse the repository at this point in the history
Use config.xml cached at startup in Django settings
  • Loading branch information
joshmoore authored Nov 22, 2019
2 parents 4d656cf + a5c1d2b commit 9372c3d
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions omeroweb/webclient/webclient_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@

from omero.gateway import KNOWN_WRAPPERS

from omero.plugins.admin import AdminControl

from django.utils.encoding import smart_str
from django.conf import settings

Expand Down Expand Up @@ -249,14 +247,11 @@ def getClientSettings(self):
Local config settings override client settings sent by the server
"""
configmap = super(OmeroWebGateway, self).getClientSettings()
localcfg = AdminControl().open_config()
try:
for key in localcfg.keys():
if key.startswith('omero.client.'):
configmap[key] = localcfg[key]
return configmap
finally:
localcfg.close()
localcfg = settings.CONFIG_XML
for key in localcfg.keys():
if key.startswith('omero.client.'):
configmap[key] = localcfg[key]
return configmap

def getEmailSettings(self):
"""
Expand Down

0 comments on commit 9372c3d

Please sign in to comment.