Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[paho-dev] paho async

Hello Paho,
i am using tornado (python async web framework) with paho.

@run_on_executor
def pub(self,msg,topic='',broker='localhost',port='',qos=1):
        self.settings['paho'].connect_async(broker)
        a = self.settings['paho'].loop_start()
        re = self.settings['paho'].publish(topic, msg, qos=qos)

i cal it hear
async def get(self):
    await self.sub(topic='rec/home/led')
would it be good idea or something i need to know?
please help.
thankyou

Back to the top