question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

emitting from an external process, not able to receive it on client

See original GitHub issue

I am trying to emit events from external process using redis but not able to receive it on client end. I used the sample file from examples for aiohttp for client.

Code:

async def background_task():
    count = 0
    global streaming_status
    streaming_status = True
    while streaming_status:
        await sio.sleep(10)
        count += 1
        print("Keep alive message")
        await external_sio.emit('event response', {'data': 'getting external event'}, namespace=namspace_live_meeting)
        await sio.emit('event response', {'data': 'Keep alive event'}, namespace=namspace_live_meeting)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
miguelgrinbergcommented, Dec 15, 2022

@devamin this is the section of the docs that covers scaling the server: https://python-socketio.readthedocs.io/en/latest/server.html#scalability-notes. I have a complete example based on the Flask-SocketIO extension here: https://github.com/miguelgrinberg/flack.

The code that you posted is actually incorrect. Emitting from an auxiliary process is a feature that allows the aux process to emit to a client. You seem to be trying to emit to the server, which is not what this feature does. If you want to emit to the server, then there is no reason to use an auxiliary process, just use the client directly.

0reactions
devamincommented, Dec 15, 2022

Thanks a lot

Read more comments on GitHub >

github_iconTop Results From Across the Web

Flask-socketio instance not Emitting from an External Process ...
The idea is that you want several server processes to emit to the client. This feature allows the Django server to emit to...
Read more >
Attach to running processes with the Visual Studio debugger
Discover how to attach the Visual Studio debugger to a running process on a local or remote computer.
Read more >
Process | Node.js v19.3.0 Documentation
The 'beforeExit' event is emitted when Node.js empties its event loop and has no additional work to schedule. Normally, the Node.js process will...
Read more >
Connecting with clients - Counseling Today
Guterman referred the client to a program that took a secular approach to treatment rather than asking those in recovery to focus on...
Read more >
HTTP header manipulation - Envoy Proxy
An invalid (not “http” or “https”) scheme, or an https scheme over an ... If an external client sets this header, Envoy will...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found