Merged in init_spark_plugin (pull request #372)
[RTM] Always init_spark_plugin() for libspark.so
This commit is contained in:
commit
90976ffeba
2 files changed
+8
-3
No files matched your search
@@ -164,7 +164,7 @@ extern "C" void init_tas_plugin(bts::SparkServices& srv) {
|
||||
}
|
||||
|
||||
extern "C" void init_spark_plugin(bts::SparkServices &srv) {
|
||||
auto dyn_algo_config = config::get<config::toggles::DynamicAlgos>();
|
||||
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())
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <boost/dll.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
void init_spark_plugin(bts::SparkServices &serv);
|
||||
extern "C" void init_spark_plugin(bts::SparkServices &serv);
|
||||
|
||||
namespace bts {
|
||||
namespace plugin {
|
||||
@@ -31,12 +31,15 @@ void init_plugins(SparkServices &services) {
|
||||
return;
|
||||
}
|
||||
|
||||
// initialize the plugins in libspark.so
|
||||
init_spark_plugin(services);
|
||||
|
||||
boost::filesystem::directory_iterator end;
|
||||
for (auto iter = boost::filesystem::directory_iterator(plugin_path);
|
||||
iter != end; ++iter) {
|
||||
auto &f = *iter;
|
||||
|
||||
auto pl = f.path().string();
|
||||
auto pl = f.path().filename().string();
|
||||
|
||||
if (pl == "order_plugin_example.so" &&
|
||||
config::get<config::DeploymentType>().type() != "dev") {
|
||||
@@ -46,6 +49,8 @@ void init_plugins(SparkServices &services) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (pl == "libspark.so") continue;
|
||||
|
||||
LOG(Plugin, Info, "Attempting to initialize plugin {}", pl);
|
||||
try {
|
||||
auto init_plugin = boost::dll::import<void(SparkServices &)>(
|
||||
|
||||
Reference in new issue
Block a user