for example:
from asgiref.sync import async_to_sync as a2s
from channels.layers import get_channel_layer
from channels_mqtt import settings
event = {"type": settings.MQTT_PUBLISH, "text": {"topic": topic, "payload":
payload, "qos": qos, "retain": retain}}
a2s(channel_layer.send)(channel, event)
gt; consumer is still in the same process as the MQTT client, i.e. the one
> started with "runmqttworker" management command.
>
> What I am trying to do is tohandle those events within another process.
>
> Andrea
>
> On Thursday, May 2, 2019 at 2:33:01 PM UTC+2,
have a try of https://github.com/ruralscenery/channels_mqtt
Andrea Conti於 2019年5月2日星期四 UTC+8下午7時40分20秒寫道:
>
> Hello,
>
> I am trying to use Channels 2 to implement an http/websocket application
> which also handles asynchronous requests from a second source (right now
> it's messages from an
installed packages:
channels==2.1.3
asgiref==2.3.2
channelsmultiplexer==0.0.2
chanels-redis==2.3.0
django==2.0.8
from channels.layers import get_channel_layer
from asgiref.sync import async_to_sync as a2s
cl = get_channel_layer()
class Yyy:
def tt(self, z):
for x in range(0, z):
QUER GANHAR MUITO DINHEIRO?
GENTE FUNCIONA DE VERDADE.. EU FIZ UMA VEZ.. JÁ TÔ
FAZENDO DENOVO
VAMOS NOS AJUDAR...FUNCIONA!!!
Olá... pessoal, a seguir está todo o relato de um programa que está
mudando a vida de muita gente através da internet... o programa é
honesto, constitucionalmente lega
5 matches
Mail list logo