Exemplo n.º 1
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
Exemplo n.º 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
Exemplo n.º 3
0
    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
Exemplo n.º 4
0
    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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 7
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,
                                 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