ExchangeOpenOrders are now routed all the way to OrderServiceServer
This commit is contained in:
1 parent
2c17fe334e
commit
70af51e163
10 files changed
+119
-9
No files matched your search
@@ -25,6 +25,7 @@
|
||||
#include "lib/orderman/events/ExchangePositionEvent.h"
|
||||
#include "lib/orderman/events/OrderOpResultEvent.h"
|
||||
#include "lib/orderman/order_factory/DynamicOrderRegistry.h"
|
||||
#include "lib/orderman/orderman_utils/ExchangeOpenOrders.h"
|
||||
#include "lib/plugin/SparkServices.h"
|
||||
#include "lib/plugin/plugin.h"
|
||||
#include "lib/utils/PBUtils.h"
|
||||
@@ -250,6 +251,14 @@ OrderServiceServer::OrderServiceServer(
|
||||
exch_pos.total_exchange_positions.size());
|
||||
ctx.post([this, exch_pos] { this->_on_exchange_position(exch_pos); });
|
||||
},
|
||||
[this, &ctx](const ExchangeOpenOrders &exch_open_orders) {
|
||||
LOG(OrderMan, Info,
|
||||
"OrderServiceServer open orders n_open_orders: {} ",
|
||||
exch_open_orders.all_open_orders.size());
|
||||
ctx.post([this, exch_open_orders] {
|
||||
this->_on_exchange_open_orders(exch_open_orders);
|
||||
});
|
||||
},
|
||||
me->dyn_order_registry, thread->executor.make_proxy(), mdc.oracle());
|
||||
|
||||
thread->executor.activate(me->service_bridge);
|
||||
@@ -472,5 +481,12 @@ void OrderServiceServer::_on_exchange_position(
|
||||
me->exchange_pos_publisher.flush();
|
||||
}
|
||||
|
||||
void OrderServiceServer::_on_exchange_open_orders(
|
||||
const ExchangeOpenOrdersEvent &ev) {
|
||||
LOG(OrderMan, Info,
|
||||
" OrderServiceServer::_on_exchange_open_orders n_open_orders: {}",
|
||||
ev.open_orders.all_open_orders.size());
|
||||
}
|
||||
|
||||
} // namespace orderman
|
||||
} // namespace bts
|
||||
Reference in new issue
Block a user