From 59815cbc74388c47fa91ddcf3818f93ee7d93f12 Mon Sep 17 00:00:00 2001 From: BryantHe Date: Thu, 26 Oct 2023 12:34:08 +0800 Subject: [PATCH] feat: flask_nameko add params --- chassis/flask_nameko/proxies.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chassis/flask_nameko/proxies.py b/chassis/flask_nameko/proxies.py index 825fd09..24931b2 100644 --- a/chassis/flask_nameko/proxies.py +++ b/chassis/flask_nameko/proxies.py @@ -65,11 +65,13 @@ class FlaskPooledClusterRpcProxy(PooledClusterRpcProxy): if app: self.init_app(app) - def init_app(self, app): + def init_app(self, app, extra_config=None): config = dict() for key, val in app.config.items(): if key == 'NAMEKO_AMQP_URI': config['uri'] = val + if isinstance(extra_config, dict): + config.update(extra_config) self.configure(config) self._connect_on_method_call = config.get(