Closed imemo88 closed 4 days ago
LGTM - Thanks @imemo88
@cjdsellers this is good to go from my end
This following is causing an infinite loop in test_account_statement
class BetfairExecutionClient(LiveExecutionClient):
def __init__() -> None:
.... # omitted
self._init_scheduled_tasks() <---- causing infinite loop
def _init_scheduled_tasks(self) -> None:
self.create_task(self.account_state_updates())
Multiple execution.connect() calls will spawn multiple update_account_state() coros.
I think we're still going to want to start this in the connect method. If we're creating multiple instances we either need to skip if one exists already or better yet clean it up before we call connect again.
A better solution would probably be saving a reference to the running account state task and shutting it down in the _disconnect
method - which gets called on reconnection.
Thanks @limx0, I'll have a look at the suggestions!
Closed from #1751 and will also credit @imemo88 in the release notes.
Pull Request
Apologies for a somewhat large PR. I tried to keep it small.
Feature:
Fixes:
Type of change
How has this change been tested?
In prod, but I suspect I may need to submit a few modifyOrder fixes once I get more runtime