Re: Django Channels: best way to launch multiple workers

2024-08-09 Thread Duane Hilton
sses in the docs. However, you can save a bit >>> of memory usage with threading, so you can use that if you want. >>> >>> I would not, however, recommend running more than 2 - 4 threads per >>> process, as otherwise you'll likely see performance take a slide

Re: Django Channels and multi-tenant will this be a world of hurt?

2024-01-27 Thread David Emanuel Sandoval
ebSocket >>>> connections)" >>>> ) >>>> return self.inner( >>>> dict(scope, schema_name=schema_name, multitenant=True) >>>> ) >>>> >>>> My `routing.py`: >>>> >>>

Re: Django Channels and multi-tenant will this be a world of hurt?

2024-01-27 Thread David Emanuel Sandoval
gt;> >>> import MTSchemaMiddleware # from wherever your Middleware class resides >>> application = ProtocolTypeRouter({ >>> 'websocket': ( >>> MTSchemaMiddleware( >>> URLRouter( >>> chat.routing.websocket_urlpatterns

Re: Django Channels and multi-tenant will this be a world of hurt?

2024-01-27 Thread Nagaraja
m wherever your Middleware class resides >> application = ProtocolTypeRouter({ >> 'websocket': ( >> MTSchemaMiddleware( >> URLRouter( >> chat.routing.websocket_urlpatterns >> ) >> ) >> ) >> }) >> >> After

Re: Django Channels and multi-tenant will this be a world of hurt?

2024-01-27 Thread 'Sebastián García' via Django users
rotocolTypeRouter({ > 'websocket': ( > MTSchemaMiddleware( > URLRouter( > chat.routing.websocket_urlpatterns > ) > ) > ) > }) > > After you do this, you will be able to access the `schema_name` and > `multitenant` variables inside your cons

Re: Performance profiling Django Channels async consumers

2023-11-28 Thread Shaheed Haque
11:29:37 AM UTC-5 Filbert wrote: > >> We are heavily using Django Channels async consumers and haven't found a >> way instrument for performance profiling. >> >> We've tried NewRelic, but per their developers say they don't have >> support for Djang

Re: Performance profiling Django Channels async consumers

2023-11-28 Thread Filbert
crickets...sigh... On Monday, November 27, 2023 at 11:29:37 AM UTC-5 Filbert wrote: > We are heavily using Django Channels async consumers and haven't found a > way instrument for performance profiling. > > We've tried NewRelic, but per their developers say they don't

Performance profiling Django Channels async consumers

2023-11-27 Thread Filbert
We are heavily using Django Channels async consumers and haven't found a way instrument for performance profiling. We've tried NewRelic, but per their developers say they don't have support for Django Channels. We run certain websocket connections through Gunicorn, Uvicorn, Cha

Re: Getting Django Channels working with NewRelic

2023-11-17 Thread Lutaaya Jamil
irst time though. >> Is doing the same as celery? >> I am interested in making it work with you, we might dive into it >> together, you never know...Adding a new skill is worth it >> >> On Friday, 17 November 2023 at 18:54:52 UTC+3 Tim Nelson wrote: >> >>

Re: Getting Django Channels working with NewRelic

2023-11-17 Thread Filbert
gh. > Is doing the same as celery? > I am interested in making it work with you, we might dive into it > together, you never know...Adding a new skill is worth it > > On Friday, 17 November 2023 at 18:54:52 UTC+3 Tim Nelson wrote: > >> I am trying to get NewRelic monitorin

Re: Getting Django Channels working with NewRelic

2023-11-17 Thread Lutaaya Jamil
to get NewRelic monitoring my ASGI code written in Django > Channels. > > Most notably, this line of code from their examples should create a > NewRelic transaction and start monitoring all async activity. > >channel_layer = > newrelic.agent.ASGIApplicationWrapper

Getting Django Channels working with NewRelic

2023-11-17 Thread Tim Nelson
I am trying to get NewRelic monitoring my ASGI code written in Django Channels. Most notably, this line of code from their examples should create a NewRelic transaction and start monitoring all async activity. channel_layer = newrelic.agent.ASGIApplicationWrapper(get_default_application

Re: Django Channels with Queue (Lobby) Manager

2023-07-11 Thread Alec Delaney
Nicee On Tue, Jul 11, 2023, 11:56 AM Alex R wrote: > Hello dear Community! > > I need help with Django channels and Websockets (i guess) for an > application I am building. The project is online Chess game with Django as > a backend and vanilla JavaScript (ajax, jQuey and some

Django Channels with Queue (Lobby) Manager

2023-07-11 Thread Alex R
Hello dear Community! I need help with Django channels and Websockets (i guess) for an application I am building. The project is online Chess game with Django as a backend and vanilla JavaScript (ajax, jQuey and some bootstrap). We are using custom chess engine written in python. Previously

Django Channels: Implementing an HTTP endpoint for server-sent events.

2023-04-18 Thread Gabriel Morales
In the consumer example that Django Channels provides (attached image) about implementing an HTTP endpoint for Server-sent events (SSE), it leaves me with a doubt: If I implement an endpoint with that consumer, connect to it from a client, and then disconnect, it throws the following error

Re: Django Channels 2 Group_send to channel layer causes runtime error: "got Future attached to a different loop"

2023-03-22 Thread raed
how did you test it ? did you use a specific cmd to excute ? Le vendredi 16 février 2018 à 22:08:55 UTC+1, Luke Hebert a écrit : > Trying to call the "alert_receive" consumer method > > import json > from channels.consumer import SyncConsumer > from channels.exceptions import StopConsumer > from

Re: Django channels scalling

2022-12-29 Thread Angel Galicia Sp
. I have several apps with django channels with many customizations in order to reuse the main ws connection and it works but I'm not completely sure about the right way to achieve this (one ws connection per client). So, if someone has more experience with it, please share. On Wednesday, Dec

Re: Django channels scalling

2022-12-21 Thread Divit Rao
022, 00:01 Divit Rao, wrote: > >> Hi Team, >> currently I have deployed a Django project on EC2 server which has a RAM >> of about 2GB using Gunicorn and Ngnix, I'm using Django channels on same >> server, so as of now we have around 200 active users. currentl

Re: Django channels scalling

2022-12-21 Thread Shaheed Haque
our usage pattern of connect per message (!!!) , did sockets usage even warrant a second thought. On Thu, 22 Dec 2022, 00:01 Divit Rao, wrote: > Hi Team, > currently I have deployed a Django project on EC2 server which has a RAM > of about 2GB using Gunicorn and Ngnix, I'm using

Django channels scalling

2022-12-21 Thread Divit Rao
Hi Team, currently I have deployed a Django project on EC2 server which has a RAM of about 2GB using Gunicorn and Ngnix, I'm using Django channels on same server, so as of now we have around 200 active users. currently each user will have 5 active WebSocket connections/consumers (for

Django Channels tests: Task x got Future y attached to a different event loop

2022-11-03 Thread Jens de Ruiter
Hi everyone, I have a question regarding Django Channels testing. I've asked the question before on StackOverflow, so more info can be found here: https://stackoverflow.com/questions/74154013/django-channels-tests-task-x-got-future-y-attached-to-a-different-event-loop Any help would be gr

Re: Django channels and web rtc

2022-10-31 Thread ome chukwuemeka
I also need such a resource. I have looked online and couldn't find any. If you come across any useful information, please let me know On Mon, Oct 31, 2022 at 12:10 PM krishna soni wrote: > Anyone have any resources about how to share screen in a group through > django channels

Django channels and web rtc

2022-10-31 Thread krishna soni
Anyone have any resources about how to share screen in a group through django channels via Webrtc?? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to dj

Deploy to production django + channels

2021-12-09 Thread Gustavo Bazan
Hi, I have a django project that has the following services django, celery, celery beats, channels, nginx (everything works with docker) My question is the following, when deploying in production, is it necessary to set up two different servers for django and channels? or can it be done only wi

Django Channels and Mac users can't connect to wss

2021-09-30 Thread Mickie Blair
I have been running a program for three weeks with no issues. Suddenly yesterday people using IPad and Macs can no longer connect to the websocket. I am using Ubuntu 20.04 on AWS. I am not sure why other details would be helpful, I am just wondering if anyone else is having trouble. Thank

Django Channels channels_redis not connecting

2021-09-26 Thread raj program
I'm using Django Channels in my app to make a person to person chat function. For this I'm using *Django Channels channel layers* that uses 'Redis' as a backing store. I have following configuration in the settings.py: CHANNEL_LAYERS = { &qu

Unable to log in the user using django channels because "connection is already closed"

2021-09-04 Thread Ross Meredith
Has anybody had this before? Here is the question on SO (which is better formatted) - https://stackoverflow.com/questions/69057713/unable-to-log-in-the-user-using-django-channels-because-connection-is-already-c I'm unable to log a user in with the login function provided by Django Channel

Django channels is auto disconnecting after sending message

2021-06-15 Thread Sudipto Sarker
I am working on a personal chat application in django using django channels. The problem is that after sending message from user1 to user2, *the channels of user1(all connected channels) is auto disconnecting after sending message to chat room, although the message is passed successfully to

Django Channels and Google Cloud Run Redis

2021-04-18 Thread 'Helmy Sayed' via Django users
Dears, Can someone please help me deploy Django Channels with Google Cloud Run? Thanks in advance, Regards. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an

Django Channels and Google Cloud Run

2021-04-18 Thread 'Helmy Sayed' via Django users
Dears,    Can you please help me with Channels on Cloud Run? Regards, Helmy -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegr

Sending Websocket Data in View Not Working (Django Channels)

2021-03-17 Thread Stephen Lalor
Hi, I have what I think is an interesting problem: - Sending data to websocket in console works. - Sending data to websocket within view does not. I detailed what's happening on SO . I'd love to kno

How can I use a Sync HTTP Consumer in Django Channels?

2021-02-08 Thread Tal
I'm using Channels v2. I want to integrate long-polling into my project. The only consumer I see in the documentation for http long polling is the AsyncHttpConsumer . The code I need to run in my handle function

Django Channels - Monitoring and Testing Performance in Prod

2021-01-05 Thread Myer Nore
I work on an app that has Django Channels 1 deployed in production with CPU-based auto-scaling. Most of the time, it works fine, but sometimes, when the site is busy and many users are utilizing the parts of our application that are channels-intensive, users are unable to utilize their

Django Channels understanding

2020-12-07 Thread chinmay...@gmail.com
I created a Consumer class with AsyncJsonWebsocketConsumer and initialized a variable with an array ['test']; such that "test" becomes one of the groups(or broadcast room) In the following code ``` async def connect(self): await self.channel_layer.group_add( group='test',

Re: Django Channels

2020-11-05 Thread Damanjeet Singh
Hello, Please add console.log() in html page and check when client was connected and disconnected. I confirm chat message example works good. Regards On Wed, 4 Nov 2020, 08:55 Yeddu Prasad, wrote: > Hi all, I am trying to learn to setup a django chat using channels. I > tried the Channels tuto

How to send a message to all consumers using Django Channels 3.0.0?

2020-11-04 Thread Karam Haj
https://stackoverflow.com/questions/64689093/how-to-send-a-message-to-all-consumers-using-django-channels-3-0-0 -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, sen

Django Channels

2020-11-04 Thread Yeddu Prasad
Hi all, I am trying to learn to setup a django chat using channels. I tried the Channels tutorial at https://channels.readthedocs.io/en/latest/index.html and got into some issues. My issue is as below. When 1st browser joins a room it works just fine. But the moment a new browser session joins

How to recover from Django Channels connection limit?

2020-10-29 Thread hype...@gmail.com
I'm running a server on heroku where I have intermittent channel layer communications between instances of asyncConsumers. Running heroku locally, I have no problem with redis channel connection since I can have as many of them as I want, but once I upload my server to heroku, it gives me a 2

Django channels

2020-09-22 Thread zidan....@gmail.com
Hi there . its my first time to post on this comunity and i'm very happy to to do that. I'm using djnago channels `AsyncWebsocketConsumer` consumer . pay attention to `receive` method in my code .in i cant understand why this code block `await self.channel_layer.group_send` called after this

Use AUTHENTICATION_BACKENDS with django channels

2020-09-17 Thread Ron2020
Hi I try to figure out how to use django AUTHENTICATION_BACKENDS with django channels I see it get KeyError (_auth_user_id) when parse the request, I wonder why it return anonymous user immediately and not query the AUTHENTICATION_BACKENDS

Django channels invalid state

2020-09-17 Thread shreeh...@gmail.com
I have built a chat(One to one) application with django channels, redis. When both the users send msg at same time, an error occurs saying Invalid state. Frontend is react natie > backend is drf. Can someone please help me with this ASAP ? Thank you -- You received this message because

django channels consumers

2020-08-11 Thread Vahid Asadi
Hi there. i want to send a message though WebSocket protocol after a user disconnected from the channel. the consumer codes is located on this link. https://paste.ubuntu.com/p/GND7tqVB6q/ the main function that sends a message to the group after a user disconnected is `chat_leave` function. th

Re: Django channels handshake failed

2020-08-06 Thread Damanjeet Singh
Please also check security in redis. I can confirm chat example in channel working fine for me. I have been using redis, channel, django, ajax, and handsontable for multiple users edit same spreadsheet. On Thu, 6 Aug 2020, 18:54 Kunal Solanke, wrote: > Make sure ur cache db is running redis if

Re: Django channels handshake failed

2020-08-06 Thread Kunal Solanke
Make sure ur cache db is running redis if you are using thay On Thu, Aug 6, 2020, 22:57 shreeh...@gmail.com wrote: > When i try to connect to the socket with js(from chrome console), > handshake fails. when i try to connect the same port using > websocket-client(python), it connects without any

Django channels handshake failed

2020-08-06 Thread shreeh...@gmail.com
When i try to connect to the socket with js(from chrome console), handshake fails. when i try to connect the same port using websocket-client(python), it connects without any errors. Can someone please help me with it. -- You received this message because you are subscribed to the Google Groups

Do I need to change my normal Django code when introducing Django Channels?

2020-07-10 Thread Marlon Patrick
Hi guys, I'm new to the python world and consequently I'm new to Django, Channels, WSGI, ASGI, etc. I asked this question on StackOverflow but I still haven't had any answers, so I decided to post here in order to try to receive some guidance. https://stackoverflow.com/question

Re: How do I preload messages on django channels?

2020-06-20 Thread GBELE CEDRIC EMMANUEL
hi , i checked your code , so if you want to call all message when a users is connected , you have to create a function to call all messages when websocket is connected , Saisissez lfrom datetime import datetimee code ici...e code ici... function: Saisissez le code ici. @database_sync_to_async

How do I preload messages on django channels?

2020-06-20 Thread georgi...@gmail.com
I am making a django live chat app using django channels. I have a Message model where I store all the previous messages. Now I need to load them when an user connects to the websocket. This is my code: https://textuploader.com/1x5ve https://textuploader.com/1x50b Can you suggest me how to

Django channels handshake response headers are missing

2020-06-17 Thread Albertas Gimbutas
Hi, I am trying to add WebSocket `permessage-deflate` extension support to my django channels consumer. As I know if a WebSocket server supports an extension (which was provided in the request headers), the server has to include the extension headers in the handshake response. Which I was

Django channels handshake headers are ignored

2020-06-17 Thread Albertas Gimbutas
Hi, I want to add WebSocket extension support to my Django channels consumer class. As I know a list of accepted extensions should be included in the headers of the handshake response of the consumer. I tried adding the response headers, however browser does not get them. I am not sure

Django Channels

2020-04-29 Thread Aditya Bohra
I followed the tutorial on django channel site which has link: https://channels.readthedocs.io/en/latest/tutorial/part_2.html import channels.layers from asgiref.sync import async_to_sync print("running") channel_layer = channels.layers.get_channel_layer() async_to_sync(channel_layer.send)('

Re: Django Rest Framework - Integrating Django Channels

2020-04-24 Thread 'Amitesh Sahay' via Django users
-750 797 8619 On Friday, 24 April, 2020, 08:08:31 pm IST, Eesa Munir wrote: Hello. I am unable to find a way to implement Django channels into a (DRF) application. If this is possible, does anybody know how to accomplish this easily and efficiently? Thank you. -- You received this

Django Rest Framework - Integrating Django Channels

2020-04-24 Thread Eesa Munir
Hello. I am unable to find a way to implement Django channels into a (DRF) application. If this is possible, does anybody know how to accomplish this easily and efficiently? Thank you. -- You received this message because you are subscribed to the Google Groups "Django users"

Re: [django-channels] How to close websocket connection from server?

2020-04-19 Thread krnrrr
another thing I managed to think of is send specific message to a specific room of a user, like: async_to_sync(channel_layer.group_send)("238", {"type": "send_text", "text": "close"}) and check in consumer's handler: async def send_text(self, event): if event == "close":

Re: [django-channels] How to close websocket connection from server?

2020-04-19 Thread krnrrr
should make when I return a newly create JWT to close connection A. i still don't get it. I saw this <https://github.com/django/channels/blob/master/channels/generic/websocket.py#L219> code and this <https://github.com/django/channels/blob/master/channels/generic/websocket.py#L

Re: [django-channels] How to close websocket connection from server?

2020-04-06 Thread Roger Gammans
You don't have to send the messages all the way to the client (browser), you can handle them directly in the consumer still on the serverside. As far as I know you'll have to keep track of metadata like all users connections yourself, but you have the connect(), disconnect() method pair to put your

Re: [django-channels] How to close websocket connection from server?

2020-04-06 Thread krnrrr
thank you for the help. I need to try it out. i think it's more down the "tell-clients-to-tell-me-to-close" route which i wanted to escape. however, i still don't understand how i can get ALL connections of a user knowing only his token. i mean, when i have an event in the system, i want to not

Re: [django-channels] How to close websocket connection from server?

2020-04-06 Thread Roger Gammans
I think you are looking at it from the wrong direction. Think about it in terms of consumers/connections, not in terms of users,and in terms of send receiving events. When in your consumers connect method, you subscribe (eg self.channel_layer.group_add() ) to add appropriate group to send user glo

Re: [django-channels] How to close websocket connection from server?

2020-04-06 Thread krnrrr
well, how I see it: - a user can subscribe to any amount of groups during the lifecycle of his JWT - how can I get a list these groups in the first place? so to be able to "send a message to an appropriate group"? I thought there's a way to decode JWT, get user ID from it and then somehow: cha

Re: [django-channels] How to close websocket connection from server?

2020-04-06 Thread Roger Gammans
Don't you just have to send a message to an appropriate group which contains just that users/sessions connections/consumers and in the message handler on the consumer call 'self.close()' and remove the consumer from any subscriptions. If I understand the docs, in the disconnect method is still ca

Re: [django-channels] How to close websocket connection from server?

2020-04-06 Thread krnrrr
or maybe any example of "superuser with groups: he can list all connections and close them if he likes"-type of application. All i found was some types of chats, but none of them included some kind of "chat-admin" with management of the rooms and visitors -- You received this message because y

[django-channels] How to close websocket connection from server?

2020-04-06 Thread krnrrr
we have django 2.0.4 and channels 2.1.7 in production. And now users must have only open 1 session allowed. (when a user logs in the second time, the first open websocket connection must be closed). I'm out of ideas on how to do it. AFAIK, `websocket.disconnect` must be sent from the client, and

Re: send django channels 2 messages to an individual user who might have more than one browser tab or device connected

2020-02-26 Thread Andréas Kühne
First of all - if you are writing something new - use the latest versions of everything. You shouldn't develop for django 2.2 now - but rather 3.0. The same goes for python and django channels. Make sure you start with the latest versions of everything. Django won't be the issue for wh

Re: send django channels 2 messages to an individual user who might have more than one browser tab or device connected

2020-02-26 Thread Levent Engin
şunu yazdı: > Regardless of how the user is connected - if you send a django channels > message to the user - you will send it to all connected devices. > > Regards, > > Andréas > > > Den ons 12 feb. 2020 kl 20:03 skrev Levent Engin : > >> Hi all. >> I want to send Chan

Re: Django Channels inifnate group expair time or any alternative solution

2020-02-18 Thread Integr@te System
Hi Naveen, Plz look at autobahn lib for all your purpose: https://crossbar.io/autobahn/ On Tue, Feb 18, 2020, 12:16 pot-potato wrote: > Dear Django-Team, > > I trying to create an IoT application with Django Channels, this is my plan > >- I have is a python program that

Django Channels inifnate group expair time or any alternative solution

2020-02-17 Thread pot-potato
Dear Django-Team, I trying to create an IoT application with Django Channels, this is my plan - I have is a python program that can fetch data from several hardware devices(PLC, Smart Sensors, etc..) and publish data into the Redis channel (this program is running 24/7 and 365 days

Re: send django channels 2 messages to an individual user who might have more than one browser tab or device connected

2020-02-14 Thread Andréas Kühne
Regardless of how the user is connected - if you send a django channels message to the user - you will send it to all connected devices. Regards, Andréas Den ons 12 feb. 2020 kl 20:03 skrev Levent Engin : > Hi all. > I want to send Channels2 messages to an individual user who migh

send django channels 2 messages to an individual user who might have more than one browser tab or device connected

2020-02-12 Thread Levent Engin
Hi all. I want to send Channels2 messages to an individual user who might have more than one browser tab or device connected. How can I do that. In documents it is said that "group_send" structure can be used. how can i implement that? Is there a sample code for this? Best Regards. Levent

Re: Django Channels Redis: MaxClientsError

2020-02-08 Thread Sabuhi Shukurov
hello, have you solved this issue? On Saturday, 6 July 2019 15:55:26 UTC+4, Cédric Foellmi wrote: > > Hello everyone. I am seeking some help with Django Channels and Redis. > > I have a Django app running on Heroku. This app is rather simple: a Daphne > server, a backgrou

Re: [django-channels] I want to use aioredis connection pool ,not create new connection in every AsyncWebsocketConsumer.connect .Where can I put the code.

2020-02-04 Thread Nathan Jones
Hi, Did you ever work out how to do this? The only way I could work out how to use a shared pool was to go back to the regular sync `redis` library and use sync_to_async, for example `settings.py` REDIS_PRO_POOL = redis.ConnectionPool(host='localhost', port=6379, db=3) `consumer.py` class T

wss (secure websocket) with Django Channels and Daphne webserver

2020-01-19 Thread Marc Mültin
Hello there, Who is fit in Django Channels and TLS handshakes? I am really stuck with configuring an SSL Context for the TLS server for secure websockets, which I thought is enabled through Django Channels. I posted my question on Stackoverflow: https://stackoverflow.com/questions/58881264

Re: Django Channels persistent DB connection

2019-11-15 Thread Adam Hooper
On Friday, November 15, 2019 at 2:02:51 PM UTC-5, ajoeiam wrote: > > If I want a connection to the database but want it for only the time > the customer (query source) is logged in - - - how do I specify that? > (So I don't want the connection to be timed - - - would rather the > connection was

Re: Django Channels persistent DB connection

2019-11-15 Thread o1bigtenor
On Fri, Nov 15, 2019 at 12:53 PM Adam Hooper wrote: > > On Wednesday, October 30, 2019 at 12:17:54 PM UTC-4, BR wrote: >> >> I moved from a local sqlite3 DB file to a shared remote (local LAN) MariaDB >> server and noticed a bit of a slow down. On top of the DB now being remote, >> I'm also usin

Re: Django Channels persistent DB connection

2019-11-15 Thread Adam Hooper
On Wednesday, October 30, 2019 at 12:17:54 PM UTC-4, BR wrote: > > I moved from a local sqlite3 DB file to a shared remote (local LAN) > MariaDB server and noticed a bit of a slow down. On top of the DB now being > remote, I'm also using SSL to encrypt the DB information. Based on the > descript

Re: Django-Channels with 2 applications

2019-11-04 Thread Daniel Carvalho
t;> I'm trying to make an example to test if it is possible to have 2 >> independent django apps connected to the same channel from django-channels. >> So far, I was able to make an example running on one machine and 2 other >> machines being able to access the first via a

Re: Django-Channels with 2 applications

2019-11-04 Thread Integr@te System
Hi Idea man, You can acknowlegdes and try it: https://channels.readthedocs.io/en/latest/ On Mon, Nov 4, 2019, 19:11 Daniel Carvalho wrote: > Hello! > > > I'm trying to make an example to test if it is possible to have 2 > independent django apps connected to the same

Django-Channels with 2 applications

2019-11-04 Thread Daniel Carvalho
Hello! I'm trying to make an example to test if it is possible to have 2 independent django apps connected to the same channel from django-channels. So far, I was able to make an example running on one machine and 2 other machines being able to access the first via a client. But the go

Re: Django Channels persistent DB connection

2019-10-30 Thread BR
I should add: My interest would be to have a DB connection that lasts the lifetime of the parent consumer. Does it already do this, and am I imagining things? On Wednesday, October 30, 2019 at 12:17:54 PM UTC-4, BR wrote: > > I moved from a local sqlite3 DB file to a shared remote (local LAN) >

Django Channels persistent DB connection

2019-10-30 Thread BR
I moved from a local sqlite3 DB file to a shared remote (local LAN) MariaDB server and noticed a bit of a slow down. On top of the DB now being remote, I'm also using SSL to encrypt the DB information. Based on the description of *database_sync_to_async* it sounds like the connection is closed/c

Django Channels Redis: MaxClientsError

2019-07-06 Thread Cédric Foellmi
Hello everyone. I am seeking some help with Django Channels and Redis. I have a Django app running on Heroku. This app is rather simple: a Daphne server, a background worker and a scheduling beat worker (the last two, using Celery). I noticed I hit *very often* Redi's MaxClientsError (

Re: django channels daphne static files

2019-07-03 Thread Sanjeev
Any fix to this problem or what could be the underlying issue here? Got one today while trying to deploy to heroku Help is appreciated -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from

Re: Notification system using django channels

2019-07-01 Thread Aldian Fazrihady
I am currently using https://developers.google.com/web/ilt/pwa/introduction-to-push-notifications for notifications as it allows notifications to be received while my app browser tabs are being closed. I use channels/websocket in my website for chatting feature. Unfortunately, I haven't written an

Notification system using django channels

2019-07-01 Thread mintu
hello guys, i want to know if is there any way where we can add notifications to our app using channels when ever a user clicks on a like button the post author should kind of get a message saying so and so person liked your post i can completely understand how channels work and all but i canno

paho.mqtt library and django-channels

2019-06-29 Thread Sabuhi Shukurov
Hello there! using paho library I wrote python scripts that subscribes MQTT broker's topics. I need to transfer message payloads to webscokets(django-channels). messages should be in real-time, has anyone experienced on these two protocols? -- You received this message because yo

Re: Django channels on IIS

2019-06-15 Thread Daniel Butler
My plan to get this to work is to have daphine handle websockets and iis normal http. I don’t know how to configure iis to allow that though. Any ideas or direction would be much appreciated On Sat, Jun 15, 2019 at 9:36 AM Daniel Butler wrote: > No you haven’t missed anything I spoke too soon. I

Re: Django channels on IIS

2019-06-15 Thread Daniel Butler
No you haven’t missed anything I spoke too soon. I was able to get the regular site running using fastcgi. I hope to revisit this once the regular site is in production. It’s too bad we are on Windows server R2 -- You received this message because you are subscribed to the Google Groups "Djang

Why "WebsocketDemultiplexer" is not available in 2.x series of Django Channels

2019-06-13 Thread Sajith Samarathunga
Why "WebsocketDemultiplexer" is not available in 2.x series the latest of Django Channels but only available on 1.x series of Django Channels. Is there any security or performance related reason for removing "WebsocketDemultiplexer". In 2.x documentation the topics "

Raise concurrent.futures._base.CancelledError when i test django channels websocket

2019-06-11 Thread nima
Hi. I'm using Django channels in server side for a speech to text application. When I test websocket with jmeter(+120 user or thread in 1 second), about half of requests fail. Here is my code: class Consumer(AsyncWebsocketConsumer): def __init__(self, *args, **k

Re: Django channels on IIS

2019-05-24 Thread Roger Gammans
On Thu, 2019-05-23 at 22:17 -0700, Daniel Butler wrote: > It looks like I found my key I had to install the application module > CGI then use this library to get everything to work! > https://pypi.org/project/wfastcgi/ Does that support websockets? IIS itself seems to ( https://docs.microsoft.c

Re: Django channels on IIS

2019-05-23 Thread Daniel Butler
It looks like I found my key I had to install the application module CGI then use this library to get everything to work! https://pypi.org/project/wfastcgi/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and st

Re: Django channels on IIS

2019-05-23 Thread Daniel Butler
Unfortunately On Thu, May 23, 2019 at 10:09 PM Aldian Fazrihady wrote: > IIS still exists? > > On Fri, 24 May 2019, 09:04 Daniel Butler, wrote: > >> First off I love this project. Django Channels is amazing! >> >> I just wanted to see if anyone has had any success

Re: Django channels on IIS

2019-05-23 Thread Aldian Fazrihady
IIS still exists? On Fri, 24 May 2019, 09:04 Daniel Butler, wrote: > First off I love this project. Django Channels is amazing! > > I just wanted to see if anyone has had any success with using iis with > Django-Channels since this post over 2 years ago. > > Thank you! >

Re: Django channels on IIS

2019-05-23 Thread Daniel Butler
First off I love this project. Django Channels is amazing! I just wanted to see if anyone has had any success with using iis with Django-Channels since this post over 2 years ago. Thank you! -- You received this message because you are subscribed to the Google Groups "Django users"

[django-channels] I want to use aioredis connection pool ,not create new connection in every AsyncWebsocketConsumer.connect .Where can I put the code.

2019-05-13 Thread CrazyNPC
Hello, Now I create new connection in connect event every time, code like this async def connect(self): self.redis = await aioredis.create_redis( 'redis://localhost',encoding='utf-8') async def disconnect(self, close_code): await self.redis.close() I need something like self.

intra server communication using django channels

2019-04-25 Thread Ulises Jimenez
. send some connection parameters and then 3. django forwards this information to the media server I'm currently having some problems implementing number 3 as I haven't found any examples of using django channels to open a websocket to an outside client unilaterally. Does anyone know

Re: How to design a notification system using Django Channels 2? (architecture)

2019-04-13 Thread Aldian Fazrihady
Will the notifications still reach users when your app browser tab/window is closed? If yes, you need to use PWA push notifications instead of websocket. On Sat, 13 Apr 2019, 22:35 , <9co...@gmail.com> wrote: > I have a social network app and users can add posts and other users can > comment po

How to design a notification system using Django Channels 2? (architecture)

2019-04-13 Thread 9conky
I have a social network app and users can add posts and other users can comment posts. I need to send a notification to the author of a post and to the other users who commented on this post. Something similar to FB notifications: - commented your post - commented pos

Re: Dispatching requests from one uwsgi to another uwsgi instance running Django Channels

2019-03-23 Thread Ahmed Ishtiaque
.io/en/latest/deploying.html> section of Django Channels docs mentions the following: "You can choose to either use Daphne for all requests - HTTP and WebSocket - or if you are conservative about stability, keep running standard HTTP requests through a WSGI server and use Daphne only for things

Django channels raises TypeError on close: An asyncio.Future, a coroutine or an awaitable is required

2019-03-23 Thread Rodrigo Bistolfi
Hi there, I am using Channels 2.1.7 with Python 3.7.2. My consumer does this on connect: async def connect(self): """Accept connect if user has been provided by middleware""" self.user = self.scope.get('user') if self.user: await self.accept() else: await se

Re: Dispatching requests from one uwsgi to another uwsgi instance running Django Channels

2019-03-23 Thread Adam Zedan
YES it worked. I used Daphne with nginx and it worked. Thank you. On Friday, March 22, 2019 at 5:58:20 PM UTC-7, Adam Zedan wrote: > > I am currently using Django channels for websocket communication. I read > this > <https://django-websocket-redis.readthedocs.io/en/latest/runn

  1   2   3   4   5   6   >