Always init_spark_plugin() for libspark.so
This commit is contained in:
1 parent
b3369db7cc
commit
6760ca1898
2 files changed
+9
-2
No files matched your search
@@ -9,6 +9,8 @@
|
||||
#include <boost/dll.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
extern "C" void init_spark_plugin(bts::SparkServices &serv);
|
||||
|
||||
namespace bts {
|
||||
namespace plugin {
|
||||
|
||||
@@ -28,12 +30,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") {
|
||||
@@ -43,6 +48,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