I need python process stdout with debug enabled.
On Wednesday, July 19, 2017 at 7:36:45 PM UTC+3, Shubham Aggarwal wrote:
>
> I am working on ordering system and using django-channels for sending a
> notification to an admin about the order has been placed and it works only
> with 1-2 orders perfectly after that no notification.
>
>
> # consumers.py
> from channels import Group
> from channels.sessions import channel_session
>
>
>
> @channel_session
> def ws_connect(message):
> print "Connect"
> message.reply_channel.send({"accept": True})
> Group('admin-channel', channel_layer=message.channel_layer).add(
> message.reply_channel)
>
>
>
> @channel_session
> def ws_disconnect(message):
> print "Disconnect"
> Group('admin-channel', channel_layer=message.channel_layer).discard(
> message.reply_channel)
>
>
> # views.py
> def view(request):
> # some order realted processing
> message = {
> "status": "Success",
> "order-id": order.id
> }
>
>
> Group('admin-channel').send({
> "text": json.dumps(message)
> })
>
>
> it stop sending message after 1-2 orders .
>
--
You received this message because you are subscribed to the Google Groups
"Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/c38a5ecb-47b9-413c-ad61-646844b65147%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.