Skip to content

Commit

Permalink
Increase the load time of the algorithm slightly.
Browse files Browse the repository at this point in the history
Reduce the probability of timeouts loading the algorithm.
  • Loading branch information
jaredbroad authored Jul 8, 2020
1 parent 6c09a17 commit 3efb39e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Engine/Setup/BacktestingSetupHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ public virtual IAlgorithm CreateAlgorithmInstance(AlgorithmNodePacket algorithmN
throw new AlgorithmSetupException("Failed to initialize debugging");
}

// limit load times to 60 seconds and force the assembly to have exactly one derived type
var loader = new Loader(debugging, algorithmNodePacket.Language, TimeSpan.FromSeconds(60), names => names.SingleOrAlgorithmTypeName(Config.Get("algorithm-type-name")), WorkerThread);
// Limit load times to 90 seconds and force the assembly to have exactly one derived type
var loader = new Loader(debugging, algorithmNodePacket.Language, TimeSpan.FromSeconds(90), names => names.SingleOrAlgorithmTypeName(Config.Get("algorithm-type-name")), WorkerThread);
var complete = loader.TryCreateAlgorithmInstanceWithIsolator(assemblyPath, algorithmNodePacket.RamAllocation, out algorithm, out error);
if (!complete) throw new AlgorithmSetupException($"During the algorithm initialization, the following exception has occurred: {error}");

Expand Down

0 comments on commit 3efb39e

Please sign in to comment.