From 201ef7a9b979f8c8efaedbe542c631944d8956f4 Mon Sep 17 00:00:00 2001 From: drebs Date: Mon, 13 Nov 2017 21:55:57 -0200 Subject: [bug] wait for checks before running servers --- src/leap/soledad/server/entrypoints.py | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) (limited to 'src/leap/soledad/server/entrypoints.py') diff --git a/src/leap/soledad/server/entrypoints.py b/src/leap/soledad/server/entrypoints.py index fa8c3ff2..0237978e 100644 --- a/src/leap/soledad/server/entrypoints.py +++ b/src/leap/soledad/server/entrypoints.py @@ -17,20 +17,14 @@ """ Entrypoints for the Soledad server. """ -import os - from twisted.internet import reactor -from twisted.python import threadpool from twisted.logger import Logger +from twisted.python import threadpool -from ..common.couch.state import check_schema_versions from .auth import localPortal, publicPortal from .session import SoledadSession -from ._config import get_config -from ._wsgi import init_couch_state -conf = get_config() log = Logger() @@ -49,25 +43,3 @@ class ServicesEntrypoint(SoledadSession): def __init__(self): portal = localPortal() SoledadSession.__init__(self, portal) - - -def check_conf(): - path = conf['blobs_path'] - blobs_not_empty = bool(os.path.exists(path) and os.listdir(path)) - if not conf['blobs'] and blobs_not_empty: - message = """ -** WARNING: Blobs is disabled, but blobs directory isn't empty. ** -** If it was previously enabled, disabling can cause data loss due blobs ** -** documents not being accessible to users. ** -** Blobs directory: %s -** REFUSING TO START. Please double check your configuration. ** - """ - log.error(message % path) - reactor.stop() - - -reactor.callWhenRunning(check_conf) -reactor.callWhenRunning(check_schema_versions, conf['couch_url']) -# see the comments in _wsgi.py regarding why couch state has to be -# initialized when the reactor is running -reactor.callWhenRunning(init_couch_state, conf) -- cgit v1.2.3