Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
3d601a13
Commit
3d601a13
authored
Nov 06, 2016
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(IONOtifyController): сделал минимальное число попыток посылки
сообщений "заказичку" maxAttempts=10 (после которого он удаляется из списка заказчиков)
parent
6d29b45a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
IONotifyController.h
include/IONotifyController.h
+1
-1
IONotifyController.cc
src/Processes/IONotifyController.cc
+3
-3
No files found.
include/IONotifyController.h
View file @
3d601a13
...
@@ -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
;
...
...
src/Processes/IONotifyController.cc
View file @
3d601a13
...
@@ -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"
,
1
5
))
maxAttemtps
(
uniset_conf
()
->
getPIntField
(
"ConsumerMaxAttempts"
,
1
0
))
{
{
}
}
...
@@ -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"
,
1
5
))
maxAttemtps
(
uniset_conf
()
->
getPIntField
(
"ConsumerMaxAttempts"
,
1
0
))
{
{
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"
,
1
5
))
maxAttemtps
(
uniset_conf
()
->
getPIntField
(
"ConsumerMaxAttempts"
,
1
0
))
{
{
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
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment