OrderServiceServer starts calling ServiceBridge's do_work only once it gets the ready signal from ServiceBridge
This commit is contained in:
1 parent
ab70c9dfb1
commit
e8405e5638
3 files changed
+44
-2
No files matched your search
@@ -260,7 +260,10 @@ OrderServiceServer::OrderServiceServer(
|
||||
thread, "Could not find a configured thread for ServiceBridge. See "
|
||||
"the OrdermanCfg key");
|
||||
me->service_bridge = new ServiceBridge(
|
||||
[this]() { me->service_ready = true; },
|
||||
[this]() {
|
||||
me->service_ready = true;
|
||||
me->context.post([this]() { _do_work(); }, 500);
|
||||
},
|
||||
[this, &ctx](auto const &orders) {
|
||||
ctx.post([this, orders] { this->on_orders(orders); });
|
||||
},
|
||||
@@ -328,7 +331,7 @@ OrderServiceServer::OrderServiceServer(
|
||||
// we should watch for some signal but right now I am not sure if such a
|
||||
// signal exist. We cant do it too early either or some other problem
|
||||
// happens. We will come to this later and fix it
|
||||
me->context.post([this]() { _do_work(); }, 300000);
|
||||
// me->context.post([this]() { _do_work(); }, 300000);
|
||||
}
|
||||
|
||||
OrderServiceServer::~OrderServiceServer() {
|
||||
|
||||
Reference in new issue
Block a user