Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting uri in constructor #105

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

noamkush
Copy link

@noamkush noamkush commented Feb 1, 2018

No description provided.

@coveralls
Copy link

Coverage Status

Coverage remained the same at ?% when pulling 16f0ed6 on noamkush:master into 7bb40a9 on beerfactory:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage remained the same at ?% when pulling 16f0ed6 on noamkush:master into 7bb40a9 on beerfactory:master.

@coveralls
Copy link

coveralls commented Feb 1, 2018

Coverage Status

Coverage remained the same at ?% when pulling 16f0ed6 on noamkush:master into 7bb40a9 on beerfactory:master.

@hongquan
Copy link
Contributor

Please provide an example.

@noamkush
Copy link
Author

noamkush commented Apr 14, 2018

Class MyPublisher:
    def __init__(self, uri):
        client = MQTTClient(config={'broker': {'uri': uri}})

    async def start(self):
        await client.connect()

Instead of passing the uri in connect (otherwise you would have to save the uri as a property).
See line 474, where you're setting broker_conf['uri'] = uri

smurfix added a commit to smurfix/hbmqtt that referenced this pull request Apr 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants