|
|
# Auction Feed |
|
|
\ No newline at end of file |
|
|
# Auction Feed
|
|
|
|
|
|
Auction feed provides realtime information about auction by websocket protocol.
|
|
|
There is custom wrap under aiohttp websocket `AuctionFeedHandler`.
|
|
|
When user comes to the feed endpoint, it ws connection [subscribed](https://gitlab.prozorro.sale/prozorro-sale/auction/-/blob/master/src/prozorro_sale/auction/api/feed.py#L112) to the [global dict of connections](https://gitlab.prozorro.sale/prozorro-sale/auction/-/blob/master/src/prozorro_sale/auction/api/feed.py#L16), and [send](https://gitlab.prozorro.sale/prozorro-sale/auction/-/blob/master/src/prozorro_sale/auction/api/feed.py#L120) auction object on connect.
|
|
|
If connected user is bidder it also have logic of `sessions`. Session is mapping of ip->browser. For now that feature is not used, but there is [issue](https://gitlab.prozorro.sale/prozorro-sale/auction-frontend/-/issues/78) for it.
|
|
|
|
|
|
After socket is connected, while it not closed, from feed getting updates about auction object. So you messages from feed will be received on every auction update. |