Re: channels 2 message type handler in different consumer

2018-06-19 Thread ILia Hopa
i think i found the issue - seems like i can't use a custom channel name. async_to_sync(self.channel_layer.group_add)("cli0-group", "custom_channel_name") changing it to self.channel_name helped. On Tuesday, June 19, 2018 at 4:12:41 PM UTC-4, itsnate_b wrote: > > can you please show what's

Re: channels 2 message type handler in different consumer

2018-06-19 Thread itsnate_b
can you please show what's in your routing.py? How are you routing to command_status_all? On Tuesday, June 19, 2018 at 4:01:32 PM UTC-4, ILia Hopa wrote: > > Here, relevant code: > Want a clients connected to Cli0Consumer to receive a message. > > class Cli0Consumer(JsonWebsocketConsumer): >

Re: channels 2 message type handler in different consumer

2018-06-19 Thread ILia Hopa
Here, relevant code: Want a clients connected to Cli0Consumer to receive a message. class Cli0Consumer(JsonWebsocketConsumer): def connect(self): try: async_to_sync(self.channel_layer.group_add)("cli0-group", "custom_channel_name") except Exception as e:

Re: channels 2 message type handler in different consumer

2018-06-19 Thread ILia Hopa
Here, relevant code: *1 consumer* (want it to receive message) class Cli0Consumer(JsonWebsocketConsumer): def connect(self): try: async_to_sync(self.channel_layer.group_add)("cli0-group", "custom_channel_name") except Exception as e: logging.error(sys.

Re: channels 2 message type handler in different consumer

2018-06-19 Thread ILia Hopa
Here, relevant code: *1 consumer* (want it to receive message) class Cli0Consumer(JsonWebsocketConsumer): def connect(self): try: async_to_sync(self.channel_layer.group_add)("cli0-group", server_name) except Exception as e: logging.error(sys.exc_info()

Re: channels 2 message type handler in different consumer

2018-06-19 Thread itsnate_b
Post some code please and I can try to help. On Tuesday, June 19, 2018 at 11:21:31 AM UTC-4, ILia Hopa wrote: > > hello! is it possible to set the handler of the group message in the > different consumer (from the one from which message was dispatched). > > ex: I have 2 consumers: `cli0consumer`

channels 2 message type handler in different consumer

2018-06-19 Thread ILia Hopa
hello! is it possible to set the handler of the group message in the different consumer (from the one from which message was dispatched). ex: I have 2 consumers: `cli0consumer` and `cli1consumer`. there is a method in a class called from `cli0consumer` which is sending a message to the group 'g