-
-
Notifications
You must be signed in to change notification settings - Fork 164
How to properly delete a stream completely from the manager? #307
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
Comments
Hi Oliver,
This prints:
So it seems like there is still some remaining data even after removing the stream. I can still see some potential issues here, because these dictionaries will grow a lot, if several streams will be created and stopped over some time. I need to mention that I tested it with version 1.46.2, so I don't know if you already reworked it in newer versions. |
Hello! wait_till_stream_has_stopped() is fixed and the current versions offer a number of improvements. I am currently preparing a new release which will be published tomorrow. I can implement this point that we discussed in "Discussions" (#279 (comment)), that should still work out. |
Its ready and released :) https://pypi.org/project/unicorn-binance-websocket-api/2.2.0/ Set
|
Hi Oliver, However, I stumbled over the _auto_data_cleanup_stopped_streams function:
Isn't the |
Right, thank you! I've already fixed it. There will be a new release in a few hours. |
Discussed in #279
Originally posted by Scoooooba June 8, 2022
Hi Guys,
given the following simple code:
When it is executed, entries for this particular stream_id are made at least in the following dictionaries (maybe in more, these were the ones I've quickly been able to find):
After stopping the stream with the
websocket_manager.stop_stream(stream_id)
command, the entries for this stream_id in the different dictionaries are still existing. There is a functionwebsocket_manager.delete_stream_from_stream_list(stream_id)
to remove the stream_id entry from thewebsocket_manager.stream_list
dicionary, but as far as I know there are no functions to delete the stream_id from all the other dictionaries.Wouldn't it make sense to implement (a) function(s) to remove a stream_id completely from the
websocket_manager
, so the manager can be properly cleaned up? Otherwise these dictionaries will grow a lot, if several streams will be created and stopped over some time.Best regards
Sebastian
The text was updated successfully, but these errors were encountered: