44 lines
1.2 KiB
C++
44 lines
1.2 KiB
C++
#include "Run.h"
|
|
#include "ICmd.h"
|
|
|
|
#include "lib/config/config.h"
|
|
#include "lib/config/protos/quickbus_cfg.pb.h"
|
|
#include "lib/config/protos/Ports.pb.h"
|
|
#include "lib/quickbus/quickbus.h"
|
|
#include "lib/api/public/ServiceContext.h"
|
|
|
|
#include "server/sparkd/persistence/PersistenceServiceServer.h"
|
|
#include "server/sparkd/user/UserServiceServer.h"
|
|
#include "server/sparkd/md/run_md.h"
|
|
#include "server/sparkd/orderman/service/OrderServiceServer.h"
|
|
#include "lib/md/relay/QueryServer.h"
|
|
|
|
namespace bts {
|
|
namespace cmd {
|
|
|
|
int Run::execute(std::vector<std::string> const &)
|
|
{
|
|
using namespace bts;
|
|
|
|
config::QuickbusNodeCfg qb_cfg;
|
|
qb_cfg.set_my_port(config::get<config::Ports>().qbus_port());
|
|
qbus::Quickbus quickbus(qb_cfg);
|
|
api::ServiceContext sc(&quickbus);
|
|
|
|
persistence::PersistenceServiceServer settings_saver(sc,"settings");
|
|
user::UserServiceServer login_server(sc);
|
|
run_market_datapublishers();
|
|
md::QueryServerPtr md_query_server(md::run_query_server(sc));
|
|
orderman::OrderServiceServer order_server(sc);
|
|
|
|
std::this_thread::sleep_until(std::chrono::time_point<std::chrono::system_clock>::max());
|
|
return 0;
|
|
}
|
|
|
|
std::string Run::help () {return "\t run default sparkd services";}
|
|
|
|
|
|
}}
|
|
|
|
|