Dynamic Algos are now loaded only when explicitely enabled by name in Toggles config
This commit is contained in:
1 parent
a008f4d0fd
commit
a5df3f2da2
2 files changed
+15
-2
No files matched your search
@@ -61,4 +61,10 @@ message EnsureOnScreenWithWorkAreaRect {
|
||||
|
||||
message IgnoreNansInDayPnL {
|
||||
optional bool enabled = 1 [default = true];
|
||||
}
|
||||
|
||||
message DynamicAlgos{
|
||||
optional bool enable_dorman = 1 [default = false];
|
||||
optional bool enable_pyramid = 2 [default = false];
|
||||
optional bool enable_tas = 3 [default = false];
|
||||
}
|
||||
@@ -3,6 +3,8 @@
|
||||
#include "lib/api/services/OrderService.pb.h"
|
||||
#include "lib/logging/logging.h"
|
||||
#include "lib/orderman/orderman_utils/orderman_utils.h"
|
||||
#include "lib/config/protos/toggles.pb.h"
|
||||
#include "lib/config/config.h"
|
||||
#include "DormanAlgo.h"
|
||||
#include "PyramidAlgo.h"
|
||||
#include "TASAlgo.h"
|
||||
@@ -159,8 +161,13 @@ extern "C" void init_tas_plugin(bts::SparkServices& srv) {
|
||||
}
|
||||
|
||||
extern "C" void init_spark_plugin(bts::SparkServices &srv) {
|
||||
init_dorman_plugin(srv);
|
||||
init_tas_plugin(srv);
|
||||
auto dyn_algo_config = config::get<config::toggles::DynamicAlgos>();
|
||||
if(dyn_algo_config.enable_dorman())
|
||||
init_dorman_plugin(srv);
|
||||
if(dyn_algo_config.enable_pyramid())
|
||||
init_pyramid_plugin(srv);
|
||||
if(dyn_algo_config.enable_tas())
|
||||
init_tas_plugin(srv);
|
||||
}
|
||||
|
||||
}}}
|
||||
Reference in new issue
Block a user