예제 #1
0
파일: serve.py 프로젝트: victor3rc/lux
 def __call__(self, argv, start=True):
     app = self.app
     server = self.pulsar_app(argv, wsgi.WSGIServer)
     if start and not server.logger:   # pragma    nocover
         if not pulsar.get_actor():
             clear_logger()
         app._started = server()
         app.on_start(server)
         arbiter = pulsar.arbiter()
         arbiter.start()
     return app
예제 #2
0
 def __call__(self, argv, start=True):
     app = self.app
     server = self.pulsar_app(argv, wsgi.WSGIServer)
     if start and not server.logger:   # pragma    nocover
         if not pulsar.get_actor():
             clear_logger()
         app._started = server()
         app.on_start(server)
         arbiter = pulsar.arbiter()
         arbiter.start()
     return app
예제 #3
0
파일: serve.py 프로젝트: pvanderlinden/lux
    def __call__(self, argv, start=True):
        app = self.app
        server = self.pulsar_app(argv, wsgi.WSGIServer)
        if server.cfg.nominify:
            app.params['MINIFIED_MEDIA'] = False

        if start and not server.logger:   # pragma    nocover
            if not pulsar.get_actor():
                clear_logger()
            app._started = server()
            app.on_start(server)
            arbiter = pulsar.arbiter()
            arbiter.start()
        return app
예제 #4
0
파일: serve.py 프로젝트: pvanderlinden/lux
    def __call__(self, argv, start=True):
        app = self.app
        server = self.pulsar_app(argv, wsgi.WSGIServer)
        if server.cfg.nominify:
            app.params["MINIFIED_MEDIA"] = False

        if start and not server.logger:  # pragma    nocover
            if not pulsar.get_actor():
                clear_logger()
            app._started = server()
            app.on_start(server)
            arbiter = pulsar.arbiter()
            arbiter.start()
        return app
예제 #5
0
    def __call__(self, argv, start=True, get_app=False):
        self.app.callable.command = self.name
        app = self.app
        server = self.pulsar_app(argv, self.wsgiApp)
        if server.cfg.nominify:
            app.params['MINIFIED_MEDIA'] = False

        if start and not server.logger:  # pragma    nocover
            if not pulsar.get_actor():
                clear_logger()
            app._started = server()
            app.on_start(server)
            arbiter = pulsar.arbiter()
            arbiter.start()

        if not start:
            return app if get_app else server
예제 #6
0
    def __call__(self, argv, start=True, get_app=False):
        self.app.callable.command = self.name
        app = self.app
        server = self.pulsar_app(argv, self.wsgiApp)
        if server.cfg.nominify:
            app.params['MINIFIED_MEDIA'] = False

        if start and not server.logger:   # pragma    nocover
            if not pulsar.get_actor():
                clear_logger()
            app._started = server()
            app.on_start(server)
            arbiter = pulsar.arbiter()
            arbiter.start()

        if not start:
            return app if get_app else server
예제 #7
0
파일: serve.py 프로젝트: quantmind/lux
    def __call__(self, argv, start=True, get_app=False):
        self.app.callable.command = self.name
        app = self.app
        server = self.pulsar_app(argv, self.wsgiApp,
                                 server_software=app.config['SERVER_NAME'])
        if server.cfg.nominify:
            app.params['MINIFIED_MEDIA'] = False

        if start and not server.logger:   # pragma    nocover
            if not get_actor():
                clear_logger()
            app._started = server()
            app.fire_event('on_start', data=server)
            arbiter().start()

        if not start:
            return app if get_app else server