QuantConnect / Lean.Brokerages.InteractiveBrokers

InteractiveBrokers Brokerage Plugin
Apache License 2.0
27 stars 17 forks source link

Possible Race Condition With StartGatewayWeeklyRestartTask #84

Closed AlexCatarino closed 8 months ago

AlexCatarino commented 9 months ago

Expected Behavior

The weekly restart is triggered every week.

Actual Behavior

One live deployment didn't trigger the weekly restart on the third week:

The user got 2FA on Sundays Sept 10th and Sep 17th at 22 UTC as expected but not on Sep 24th.

A few milliseconds before he got the following message:

2023-09-24T21:54:59.9974199Z TRACE:: InteractiveBrokersBrokerage.StartGatewayWeeklyRestartTask(): triggering weekly restart manually

The weekly restart was bumped to Oct 1st (next Sunday).

2023-09-24T21:54:59.9975778Z TRACE:: InteractiveBrokersBrokerage.StartGatewayWeeklyRestartTask(): scheduled weekly restart to 10/1/2023 10:00:00 PM (in 7.00:00:00.0024839)

Potential Solution

N/A

Checklist