class GUnicornFlaskApplication(Application, ABC):
    def __init__(self, flask_app):
        self.usage, self.callable, self.prog, self.app = None, None, None, flask_app

    def run(self, **options):
        self.cfg = Config()
        for key, value in options.items():
            self.cfg.set(key, value)
        return Application.run(self)

    load = lambda self: self.app
Пример #2
0
class GunicornApp(Application):
    def __init__(self, app):
        Application.__init__(self)
        self.cfg = None
        self.log = None
        self.app = app

    def init(self, parser, opts, args):
        pass

    def load(self):
        return self.app

    def run(self, **options):
        self.cfg = Config()
        for key, value in options.items():
            self.cfg.set(key, value)

        return Application.run(self)
Пример #3
0
class FlaskApplication(Application):

    def __init__(self, app):
        self.usage, self.callable, self.prog, self.app = None, None, None, app

    def run(self, **options):
        self.cfg = Config()
        [self.cfg.set(key, value) for key, value in options.items()]
        return Application.run(self)

    load = lambda self: self.app
Пример #4
0
    def run(self, **options):
        self.cfg = Config()
        for key, value in options.items():
            self.cfg.set(key, value)

        return Application.run(self)
Пример #5
0
 def run(self, **options):
     self.cfg = Config()
     [self.cfg.set(key, value) for key, value in options.items()]
     return Application.run(self)