-
Notifications
You must be signed in to change notification settings - Fork 32
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
Use Websockets in Tasks #19
Comments
Connections must be made from a web process since the scheduler process does not run a web server. I suggest using something like Redis to send a message from the scheduler process(es) to the web process(es). Then, the web process can send a websocket message to the client. |
You can try use AdonisJS Events for send event to WS. |
Hi @ntvsx193, could you explain more about what was your approach to send event to WS? I tried using AdonisJS Events too when initializing the socket and but keep getting undefined when I want to broadcast the message, even after the initialization happened.
|
@AudyOdi |
Please explain how to use adonis WS ( websockets ) to push data using this scheduler i got this error
Ws
.getChannel('channel:*')
.topic('channel:XYZ')
.broadcast('message', 'Message for socket')
TypeError: Cannot read property 'broadcast' of null
at curl.setHeaders.get.then
The text was updated successfully, but these errors were encountered: