mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 16:46:47 +00:00
Testing the double subscription
This commit is contained in:
parent
18dc536f3d
commit
cf26dd6aa7
|
@ -46,8 +46,6 @@ bool Sampler::ConditionalRun()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
this_thread::sleep_for(chrono::seconds(5));
|
|
||||||
|
|
||||||
if (fIterations > 0) {
|
if (fIterations > 0) {
|
||||||
++fCounter;
|
++fCounter;
|
||||||
if (fCounter >= fIterations) {
|
if (fCounter >= fIterations) {
|
||||||
|
|
|
@ -227,7 +227,11 @@ void DDSSession::StartDDSService() { fImpl->fDDSService.start(fImpl->fId); }
|
||||||
|
|
||||||
void DDSSession::SubscribeToCommands(std::function<void(const std::string& msg, const std::string& condition, uint64_t senderId)> cb)
|
void DDSSession::SubscribeToCommands(std::function<void(const std::string& msg, const std::string& condition, uint64_t senderId)> cb)
|
||||||
{
|
{
|
||||||
|
fImpl->fSession.unsubscribe(); // TODO REMOVE THIS HACK!!!!
|
||||||
fImpl->fDDSCustomCmd.subscribe(cb);
|
fImpl->fDDSCustomCmd.subscribe(cb);
|
||||||
|
fImpl->fDDSCustomCmd.subscribeOnReply([](const std::string& reply) {
|
||||||
|
LOG(debug) << reply;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void DDSSession::SendCommand(const std::string& cmd) { fImpl->fDDSCustomCmd.send(cmd, ""); }
|
void DDSSession::SendCommand(const std::string& cmd) { fImpl->fDDSCustomCmd.send(cmd, ""); }
|
||||||
|
|
|
@ -65,6 +65,7 @@ Topology::Topology(DDSTopology topo, DDSSession session)
|
||||||
|
|
||||||
std::vector<uint64_t> deviceList = fDDSTopo.GetDeviceList();
|
std::vector<uint64_t> deviceList = fDDSTopo.GetDeviceList();
|
||||||
for (const auto& d : deviceList) {
|
for (const auto& d : deviceList) {
|
||||||
|
LOG(info) << "fair::mq::Topology Adding device " << d;
|
||||||
fTopologyState.emplace(d, DeviceStatus{ false, DeviceState::Ok });
|
fTopologyState.emplace(d, DeviceStatus{ false, DeviceState::Ok });
|
||||||
}
|
}
|
||||||
fDDSSession.SubscribeToCommands([this](const std::string& msg, const std::string& condition, uint64_t senderId) {
|
fDDSSession.SubscribeToCommands([this](const std::string& msg, const std::string& condition, uint64_t senderId) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user