예제 #1
0
 def __init__(self):
     """
     Initializes the application and persistent objects/modules (settings, plugins,...)
     """
     super(KonTextWsgiApp, self).__init__()
     self.cleanup_runtime_modules()
     os.environ['MANATEE_REGISTRY'] = settings.get('corpora', 'manatee_registry')
     setup_plugins()
     translation.load_translations(settings.get('global', 'translations'))
예제 #2
0
파일: app.py 프로젝트: czcorpus/kontext
 def __init__(self):
     """
     Initializes the application and persistent objects/modules (settings, plugins,...)
     """
     super(KonTextWsgiApp, self).__init__()
     self.cleanup_runtime_modules()
     os.environ['MANATEE_REGISTRY'] = settings.get('corpora', 'manatee_registry')
     setup_plugins()
     translation.load_translations(settings.get('global', 'translations'))
예제 #3
0
파일: app.py 프로젝트: anukat2015/kontext
 def __init__(self):
     """
     Initializes the application and persistent objects/modules (settings, plugins,...)
     """
     setup_logger(settings)
     cleanup_runtime_modules()
     setup_plugins()
     translation.load_translations(settings.get('global', 'translations'))
     l10n.configure(settings.get('global', 'translations'))
     os.environ['MANATEE_REGISTRY'] = settings.get('corpora', 'manatee_registry')
예제 #4
0
파일: app.py 프로젝트: anukat2015/kontext
 def __init__(self):
     """
     Initializes the application and persistent objects/modules (settings, plugins,...)
     """
     setup_logger(settings)
     cleanup_runtime_modules()
     setup_plugins()
     translation.load_translations(settings.get('global', 'translations'))
     l10n.configure(settings.get('global', 'translations'))
     os.environ['MANATEE_REGISTRY'] = settings.get('corpora',
                                                   'manatee_registry')
예제 #5
0
파일: app.py 프로젝트: dlukes/kontext
    def __init__(self):
        """
        Initializes the application and persistent objects/modules (settings, plugins,...)
        """
        super(KonTextWsgiApp, self).__init__()
        self.cleanup_runtime_modules()
        os.environ['MANATEE_REGISTRY'] = settings.get('corpora',
                                                      'manatee_registry')
        setup_plugins()
        translation.load_translations(settings.get('global', 'translations'))

        def signal_handler(signal, frame):
            for p in plugins.runtime:
                fn = getattr(p.instance, 'on_soft_reset', None)
                if callable(fn):
                    fn()

        signal.signal(signal.SIGUSR1, signal_handler)