LUCIT-Systems-and-Development / unicorn-binance-websocket-api

A Python SDK by LUCIT to use the Binance Websocket API`s (com+testnet, com-margin+testnet, com-isolated_margin+testnet, com-futures+testnet, com-coin_futures, us, tr, dex/chain+testnet) in a simple, fast, flexible, robust and fully-featured way.
https://unicorn-binance-websocket-api.docs.lucit.tech/
Other
685 stars 165 forks source link

Maybe add ability to turn high CPU usage error off/on? #124

Closed MrGoriay closed 3 years ago

MrGoriay commented 3 years ago

Is your feature request related to a problem? Please describe. I understand that it is not hurting anyone, but i would still like to be able to turn 'High cpu usage' error off when needed.

Describe the solution you'd like Some kind of function that will change some kind of flag or anything that will work, does not matter

Additional context Great work with this library!

oliver-zehentleitner commented 3 years ago

this logging is new and it could be made better, for example log only if cpu is longer than X seconds touching 100% and yes we can add a flag to disable it.

I added it, because I recognized that if the server is often at 100% cpu usage, your streams are restarting with error 1006 in cause of that! I guess every one wants to avoid that, because you are going to lose data between a reconnect.

MrGoriay commented 3 years ago

Thanks for quick reply. I understand, your solution is more flexible. It'll be great to see any solution in the next update. Thanks again for your effort.

oliver-zehentleitner commented 3 years ago

It think it should fit better now: https://github.com/oliver-zehentleitner/unicorn-binance-websocket-api/commit/5d9434a3de137da4dcbccc144034c93cec94a6f5

I will try to find the right balance for this and test how adequate the info is in the upcoming releases.