-
-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Poll the server for number of clients #6
Comments
Hello, yes, Cent does not support this. There is an endpoint |
I have a process that sends logging info to the browser via websockets. The process is launched via supervisor in the Django View if it's not already running. But when all clients have left the channel, then I'd like to kill the process. But I only want to do it when I can be sure that there are no users left in the channel (except for the client that's publishing the logs to the channel, of course). So that's what I had in mind. |
So it seems like |
Yes, that's right. If there'd be an easy way to get that, it would just make my day. |
https://github.com/centrifugal/adjacent/blob/master/adjacent/client.py#L36 or just: client.add('presence', {
'channel': 'your_channel'
})
result, error = client.send() Note that to get presence it must be enabled for channel in project options in configuration file |
I also want to add |
I might be misunderstanding you. I need the count of clients present in a channel. Doesn't the |
|
Enlightenment! I must have had my |
You are welcome! I just pushed some new methods to |
I reviewed your code changes a bit; looks like some nice improvements & streamlining. l'll watch for your updates. |
v0.5.0 released! |
I'm deploying centrifugo in a Django project and I need to manage a process if there are no more clients connected to centrifugo. It doesn't seem to me that cent supports this. Is there a way to find out (from python) how many clients are connected to centrifugo?
Or if you have some other recommendation, let me know. Thanks!
The text was updated successfully, but these errors were encountered: