feat: flask_nameko add params
This commit is contained in:
parent
e16796b256
commit
59815cbc74
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue