Commit 3d601a13 authored by Pavel Vainerman's avatar Pavel Vainerman

(IONOtifyController): сделал минимальное число попыток посылки

сообщений "заказичку" maxAttempts=10 (после которого он удаляется из списка заказчиков)
parent 6d29b45a
...@@ -352,7 +352,7 @@ class IONotifyController: ...@@ -352,7 +352,7 @@ class IONotifyController:
sigc::connection conInit; sigc::connection conInit;
sigc::connection conUndef; sigc::connection conUndef;
int maxAttemtps; /*! timeout for consumer */ int maxAttemtps; /*! максимальное количество попыток послать сообщение заказчику, после чего он будет удалён из списка */
std::mutex lostConsumersMutex; std::mutex lostConsumersMutex;
......
...@@ -40,7 +40,7 @@ using namespace std; ...@@ -40,7 +40,7 @@ using namespace std;
IONotifyController::IONotifyController(): IONotifyController::IONotifyController():
askIOMutex("askIOMutex"), askIOMutex("askIOMutex"),
trshMutex("trshMutex"), trshMutex("trshMutex"),
maxAttemtps(uniset_conf()->getPIntField("ConsumerMaxAttempts", 15)) maxAttemtps(uniset_conf()->getPIntField("ConsumerMaxAttempts", 10))
{ {
} }
...@@ -50,7 +50,7 @@ IONotifyController::IONotifyController(const string& name, const string& section ...@@ -50,7 +50,7 @@ IONotifyController::IONotifyController(const string& name, const string& section
restorer(d), restorer(d),
askIOMutex(name + "askIOMutex"), askIOMutex(name + "askIOMutex"),
trshMutex(name + "trshMutex"), trshMutex(name + "trshMutex"),
maxAttemtps(uniset_conf()->getPIntField("ConsumerMaxAttempts", 15)) maxAttemtps(uniset_conf()->getPIntField("ConsumerMaxAttempts", 10))
{ {
conUndef = signal_change_undefined_state().connect(sigc::mem_fun(*this, &IONotifyController::onChangeUndefinedState)); conUndef = signal_change_undefined_state().connect(sigc::mem_fun(*this, &IONotifyController::onChangeUndefinedState));
conInit = signal_init().connect(sigc::mem_fun(*this, &IONotifyController::initItem)); conInit = signal_init().connect(sigc::mem_fun(*this, &IONotifyController::initItem));
...@@ -61,7 +61,7 @@ IONotifyController::IONotifyController( ObjectId id, std::shared_ptr<NCRestorer> ...@@ -61,7 +61,7 @@ IONotifyController::IONotifyController( ObjectId id, std::shared_ptr<NCRestorer>
restorer(d), restorer(d),
askIOMutex(string(uniset_conf()->oind->getMapName(id)) + "_askIOMutex"), askIOMutex(string(uniset_conf()->oind->getMapName(id)) + "_askIOMutex"),
trshMutex(string(uniset_conf()->oind->getMapName(id)) + "_trshMutex"), trshMutex(string(uniset_conf()->oind->getMapName(id)) + "_trshMutex"),
maxAttemtps(uniset_conf()->getPIntField("ConsumerMaxAttempts", 15)) maxAttemtps(uniset_conf()->getPIntField("ConsumerMaxAttempts", 10))
{ {
conUndef = signal_change_undefined_state().connect(sigc::mem_fun(*this, &IONotifyController::onChangeUndefinedState)); conUndef = signal_change_undefined_state().connect(sigc::mem_fun(*this, &IONotifyController::onChangeUndefinedState));
conInit = signal_init().connect(sigc::mem_fun(*this, &IONotifyController::initItem)); conInit = signal_init().connect(sigc::mem_fun(*this, &IONotifyController::initItem));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment