Remove OldSecurity

This commit is contained in:
Eric Harding committed 2017-09-21 16:51:48 -04:00
1 parent 640e503b6c
commit 5fc7d3ff78
120 files changed
+1028 -2246

No files matched your search

+10 -6
View File
@@ -92,7 +92,7 @@ struct MDConsumerGroup {
}
UserSymbol symbol;
Platform::type platform;
Platform platform;
MDConsumer consumer;
MDConsumerChannel channel;
@@ -114,7 +114,7 @@ private:
auto id = consumer.id();
channel = consumer.get_channel(symbol.symbol(), symbol.type(), symbol.exchange());
consumer.on_security(
[this,id](const OldSecurity&, MDConsumerHandle handle) {
[this,id](const Security&, MDConsumerHandle handle) {
if (id == consumer.id()) {
add_security(handle);
}
@@ -207,7 +207,7 @@ struct QueryServerImpl : public IQueryServer {
// the hot part
void fill(const SecurityChannel& chan, MDConsumerGroup& group, MDReply::ChannelReply* reply) const {
void fill(const SecurityChannel& chan, MDConsumerGroup& group, ChannelReply* reply) const {
bts_assert(reply);
reply->mutable_channel()->CopyFrom(chan);
reply->set_platform(group.platform);
@@ -219,12 +219,12 @@ struct QueryServerImpl : public IQueryServer {
auto phandles = group.handles.get();
if (!phandles) return;
MDReply::Update temp_update;
ChannelUpdate temp_update;
for (const auto& instrument : *phandles) {
bool snapshot = false;
MDConsumerHandle handle = instrument.handle;
temp_update.Clear();
MDReply::Update* pupd = &temp_update;
ChannelUpdate* pupd = &temp_update;
pupd->set_key(instrument.handle.key());
bts_assert_d(handle.is_initialized());
if (!handle.is_initialized()) continue;
@@ -378,7 +378,11 @@ QueryServerPtr run_query_server(const bts::api::ServiceContext& ctx) {
auto& threadpool = utils::Dispatcher::get_named("MDQuery");
std::set<UserSymbol> all_symbols;
get_system_md_symbols(config::get<PlatformConfig>().exchange(), config::get<PlatformConfig>().type(), all_symbols);
Venue venue;
bts_assert(api::Venue_Parse(config::get<PlatformConfig>().exchange(), &venue));
SecurityType type;
bts_assert(api::SecurityType_Parse(config::get<PlatformConfig>().type(), &type));
get_system_md_symbols(venue, type, all_symbols);
QueryServerPtr container = std::make_shared<QueryServer>(all_symbols, threadpool, ctx);
auto& db = container->db;