Commit Graph

57 Commits

Author SHA1 Message Date
Martin-Molinero 0dfb368cb4 Lean shutdown improvements (#4982)
- Use DisposeSafely instead of dipose.
- Adding some logs to know when handlers are getting disposed.
- Normalize exit procedure
2020-12-02 09:55:50 -08:00
Colton Sellers 041a111b92 Implement safe exiting for Lean (#4972) 2020-11-27 18:14:18 -03:00
Martin Molinero eb6e0a141c Specify log file location
- Respect "results-destination-folder", if provided, for system log
2020-05-27 14:33:44 -03:00
Martin Molinero cd9bf4cc77 Making WorkerThread static
- Making WorkerThread instance static
- Adding PythonInitialize.AddPythonPaths(), useful to add paths to
python after initialization
2020-01-14 11:31:58 -03:00
Jared 053dbd5cf9 Merge pull request #3902 from Martin-Molinero/improve-null-job-exception-error-message
Improve null job exception message
2019-12-09 14:39:51 -08:00
Martin Molinero 2229f1fab9 Improve null job exception message 2019-12-09 19:17:23 -03:00
Martin-Molinero 60ce6cf437 Revert "Add assembly loading logs" 2019-12-09 17:21:44 -03:00
Martin Molinero ace13218ad Add assembly loading logs 2019-11-19 12:52:21 -03:00
Michael Handschuh 09cc78599a Add mechanism for scheduled events to use 'additional time'
We restrict each algorithm time loop to a pre-determined amount of time.
Exceeding this limit will cause the algorithm to immediately terminate.
This quickly becomes an issue when considering users running trainable
models that have a long initialization period that exceeds the time loop
maximum.

This change provides a mechanism through which a long-running scheduled
event is permitted to keep running and is permitted to avoid the time loop
permitted by requesting additional time. Requests for additional time are
limited according to a leaky bucket implementation whose parameters are
set via the job's controls structure. The fundamental time unit for the
algorithm is a single minute.

Here's how it works. If a scheduled event takes longer than one full wall
clock second then a request is made to the leaky bucket for one more minute.
If the scheduled event continues to take more time, it will continue to
request additional minutes. Each requested minute will prevent the algorithm's
time loop check from terminating the algorithm. When the bucket is empty and
no more minutes are available to be requested, a TimeoutException is thrown
causing a cascade that ends in the algorithm's termination and status being
flipped to RuntimeError.

Additionally, this applies equally to ALL scheduled events. While some helpers
were added with the naming of Train and TrainNow to the ScheduleManager, these
methods don't do anything special and the infrastructure doesn't otherwise
flag them as different, so this feature becomes part of the core Scheduled
Event feature set.

Further, the live scheduled events were not touched and are still pending
further discussion regarding the value added by enforcing a time restriction
when simulation time and wall clock time are equivalent.

Fixes #3319
2019-10-19 14:52:34 -04:00
Michael Handschuh 30c8772a7e Update Compression/Jupyter/Launcher/Queues/UserInterface to respect CA1304 and CA1305
Updates all occurrences of parsing/ToString-ing to go through the new
StringExtensions methods that use CultureInfo.InvariantCulture

See #3045
2019-09-12 15:30:44 -04:00
Martin Molinero eb9fe73ebc Engine code clean up 2019-08-16 19:09:45 -03:00
AlexCatarino a751556779 Removes QuantConnect.Views project
This UX has been deprecated and now removed.
2019-08-14 21:23:58 +01:00
Stefano Raggi f44c202d76 Fix Console.OutputEncoding in LEAN Launcher (Windows only)
The current setting of Encoding.Unicode was preventing LEAN from receiving IBAutomater output and error events when running local LEAN under Windows.
Changing to Encoding.UTF8 solves the issue.
2019-08-01 17:04:26 +02:00
Jared 992d721d08 Revert "Reduce python load time 30% (#3440)" (#3441)
Reverts test commit 70017f0e05.
2019-07-28 18:37:34 -07:00
Jared 70017f0e05 Reduce python load time 30% (#3440)
Optimize python load times
2019-07-28 17:20:52 -07:00
Michael Wei 3d89898ba2 Emit an error if desktop-exe does not exist 2019-05-27 22:14:13 -07:00
Stefano Raggi a5c8a0325a Remove TotalPhysicalMemory and FreePhysicalMemory from OS class 2019-01-11 19:52:55 +01:00
AlexCatarino 296693c9f7 Logs pythonnet after it is loaded. 2018-08-27 23:36:23 +01:00
Amir Mamaghani 9d449800eb Feature - CLI arguments overrides configuration file + load config from CLI 2018-05-15 21:44:25 +02:00
Amir Mamaghani 4ac2c8cf27 QuantConnect.Configuration - Added ability to choose configuration file during runtime. 2018-05-15 15:40:30 +02:00
Andrew d893bd7398 Renamed ILeanManagement to ILeanManager
Renamed this interface and all associated classes and content to be more
in line with Lean naming conventions.
2017-08-09 16:15:52 -04:00
Andrew 719174ebae Added more logging at shutdown 2017-07-29 12:12:38 -04:00
Andrew 8ebe60a616 Exit added 2017-07-29 11:55:31 -04:00
Andrew 3a7be01d78 Remove ICommand, ICommandQueueHandler and CommandResultPacket 2017-07-14 15:39:49 -04:00
Andrew 143e779bb8 Add Dispose method to ILeanManagement 2017-07-14 12:40:53 -04:00
Andrew c7a00df8f4 Add the ILeanManagement to the LeanEngineSystemHandlers 2017-07-14 12:40:53 -04:00
Andrew 958f2504f6 Initialize ILeanManagement in Lean.Launcher 2017-07-14 12:40:52 -04:00
Andrew e4ebcf6cf3 Created ILeanManagement
ILeanManagement is meant to be a wrapper on the entire Lean engine and allow
command to be sent from ILeanManagement to the rest of Lean.  In addition,
ILeanManagement can act as a hosting environment specific implementation for hosting Leaninstances.
2017-07-14 12:40:52 -04:00
Andrew cd882d58b1 Remove call to Environment.Exit(0) 2017-02-27 12:17:59 -05:00
quant1729 e7ff615fe2 Exploring linux unicode issue 2017-02-09 16:04:27 +08:00
jaredbroad 89f7403e4d Temporary fix while debug Launcher failing to close down cleanly 2017-02-02 10:33:14 -05:00
Andrew a143b62ff4 Add userId to the runtime error packet 2017-01-31 16:41:45 -05:00
quant1729 5d05dd0d4e Turned on unicode support in console app. Nice to have when you print greeks. 2016-11-22 16:18:28 +01:00
quant1729 adfe87de6b Added logging of history provider back 2016-11-22 13:46:30 +01:00
quant1729 80bce2098a Updated engine: it gets history provider, data queue handler from the job now. JobQueue loads data from config. 2016-11-18 20:26:09 +01:00
Andrew Hart 0235e2b6a6 Replace startup message to indicate x64 or x32 process. 2016-09-02 14:34:24 -04:00
Andrew Hart ce449fde03 Use ProcessStartInfo object to launch view executable. 2016-09-01 12:51:52 -04:00
Andrew Hart 44ba00140c Launcher starts View executable 2016-08-31 12:37:39 -04:00
Andrew Hart 57d4cb4651 QuantConnect.Views is now a console application
In order to decouple the build profiles of QuantConnect.Views and the rest of the application, QuantConnevt.Views will now produce an executable that can be called from the rest of the project.  All references to QuantConnect.Views from the Laucher project are now removed.  This is all done so that The rest of the project can compile into x64.  QuantConnect.Views relies on the Gecko web browser which only comes in 32 bit flavor.
2016-08-31 12:11:33 -04:00
jaredbroad 1c42cc94aa Added simplified desktop live charting to ux 2016-06-15 12:52:32 -04:00
jaredbroad d4c5a422b9 Test fix with Mono Web Browser replacing Gecko 2016-04-19 18:41:48 -04:00
jaredbroad 1cff84ab81 Bux fixes on local charting, and solve logged with queue logger 2016-04-12 21:21:12 -04:00
jaredbroad 632c21c99c New UX for LEAN, launched from Launcher using embedded HTML browser 2016-04-11 18:29:50 -04:00
David Hsieh 4f500c04aa Updated launcher to run new desktop configuration 'backtesting-desktop'. 2016-04-04 05:28:25 +10:00
David Hsieh 98eb52c33f Merged from master, not fully tested. 2016-04-04 01:14:47 +10:00
Juan Manuel Alvarez b3494afc47 Constants renamed to Globals.
Globals values can be reloaded from configuration.
2016-03-12 01:07:31 -03:00
David Hsieh 2d73a08c87 Configured so Browser instance is handled by the presenter, is able to retrieve job details from the packet. Considering how to handle the initial configure of the local back test job. 2016-03-05 08:42:48 +10:00
David Hsieh 4404f454a1 Using GeckoFx instead of Cef as the embedded browser. Added STA to the launcher (to resolve later). Static url at moment for backtest charting, will resolve from packets received. 2016-03-04 21:38:29 +10:00
David Hsieh 718a0133a3 Configured Desktop app to always use the EventMessagingHandler as its default message handler. 2016-02-26 23:08:58 +10:00
David Hsieh a63fdfa132 Refactored Messaging to use events for the form/presenter to handle. 2016-02-25 00:46:12 +10:00