From d8cd9ecd4fb3c5493e63e6be8d7fd1bc6c54cfcc Mon Sep 17 00:00:00 2001 From: j Date: Sat, 8 Jun 2024 12:47:52 +0100 Subject: [PATCH] run read only backend if enableReadOnlyService is set --- oml/server.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/oml/server.py b/oml/server.py index fbae2fc..130f120 100644 --- a/oml/server.py +++ b/oml/server.py @@ -146,13 +146,12 @@ def run(): http_server.listen(settings.server['port'], settings.server['address'], max_buffer_size=max_buffer_size) # public server - ''' - public_port = settings.server.get('public_port') - public_address = settings.server['public_address'] - if public_port: - public_server = Application(public_handlers, **options) - public_server.listen(public_port, public_address) - ''' + if settings.preferences.get('enableReadOnlyService'): + public_port = settings.server.get('public_port') + public_address = settings.server['public_address'] + if public_port: + public_server = Application(public_handlers, **options) + public_server.listen(public_port, public_address) if PID: with open(PID, 'w') as pid: