Closed abmahmoodi closed 3 years ago
How to run client subscription in background like a thread? I have this client subscriber:
client = MQTT::Client.connect('mqtt://USER:PASSWORD@IP') client.subscribe('test2')
client.get do |topic, message| p "#{topic}: #{message}" end
I want to run this code in Rails in a job by SuckerPunch
thanks
How to run client subscription in background like a thread? I have this client subscriber:
client = MQTT::Client.connect('mqtt://USER:PASSWORD@IP') client.subscribe('test2')
client.get do |topic, message| p "#{topic}: #{message}" end
I want to run this code in Rails in a job by SuckerPunch
thanks