Support Sending Websocket API Messages from all handlers
- Dominant language
- Python
- Stars
- 11.1k
- Forks
- 1k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 2
Description
I am working with the experimental Websockets API, and so far it is working great.
The one issue I did run into was that I want to send a message to my websocket from for instance my SQS Queue when it was done processing an item on the queue.
Now keeping track of the connection ID is clearly the application developers job, however access the send api was a problem.
websocket_api.configure is not called except for websocket handlers.
I was able to work around it by setting the api URL in an environment variable and checking to see if _endpoint_url has been set and set it if not.
Everything work after that.
So the request is to call configure on websocket_api for all handlers regardless of being websocket or not (or make it easy to do in app.py)
There may. be a better way already and I am just not aware of it.
Thanks,
Mike
Contributor guide
Research direction
The issue names websocket_api.configure, websocket handlers, app.py, and an SQS Queue integration. Start by tracing where configure is called and how non-websocket handlers are initialized. Done means all handler types can access the Websocket API send operation without manually setting an endpoint URL.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- api, backend, cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100