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
4c2c1f7d
Commit
4c2c1f7d
authored
May 29, 2017
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Configuration): добавил глобальную настройку для времени игнорирования
повторного сообщения о старте. Увеличил некоторые timeout-ы по умолчанию.
parent
fc18aaba
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
26 additions
and
3 deletions
+26
-3
SharedMemory.cc
extensions/SharedMemory/SharedMemory.cc
+1
-1
UNetExchange.cc
extensions/UNetUDP/UNetExchange.cc
+1
-1
CommonEventLoop.h
include/CommonEventLoop.h
+1
-1
Configuration.h
include/Configuration.h
+2
-0
Configuration.cc
src/Various/Configuration.cc
+19
-0
test_conftest.cc
tests/test_conftest.cc
+1
-0
tests_with_conf.xml
tests/tests_with_conf.xml
+1
-0
No files found.
extensions/SharedMemory/SharedMemory.cc
View file @
4c2c1f7d
...
...
@@ -158,7 +158,7 @@ namespace uniset
evntPause
=
conf
->
getArgPInt
(
"--e-startup-pause"
,
5000
);
activateTimeout
=
conf
->
getArgPInt
(
"--activate-timeout"
,
9
0000
);
activateTimeout
=
conf
->
getArgPInt
(
"--activate-timeout"
,
12
0000
);
sidPulsar
=
DefaultObjectId
;
string
p
=
conf
->
getArgParam
(
"--pulsar-id"
,
it
.
getProp
(
"pulsar_id"
));
...
...
extensions/UNetUDP/UNetExchange.cc
View file @
4c2c1f7d
...
...
@@ -76,7 +76,7 @@ UNetExchange::UNetExchange(uniset::ObjectId objId, uniset::ObjectId shmId, const
int
recvTimeout
=
conf
->
getArgPInt
(
"--"
+
prefix
+
"-recv-timeout"
,
it
.
getProp
(
"recvTimeout"
),
5000
);
int
prepareTime
=
conf
->
getArgPInt
(
"--"
+
prefix
+
"-prepare-time"
,
it
.
getProp
(
"prepareTime"
),
2000
);
int
evrunTimeout
=
conf
->
getArgPInt
(
"--"
+
prefix
+
"-evrun-timeout"
,
it
.
getProp
(
"evrunTimeout"
),
15
000
);
int
evrunTimeout
=
conf
->
getArgPInt
(
"--"
+
prefix
+
"-evrun-timeout"
,
it
.
getProp
(
"evrunTimeout"
),
40
000
);
int
recvpause
=
conf
->
getArgPInt
(
"--"
+
prefix
+
"-recvpause"
,
it
.
getProp
(
"recvpause"
),
10
);
int
sendpause
=
conf
->
getArgPInt
(
"--"
+
prefix
+
"-sendpause"
,
it
.
getProp
(
"sendpause"
),
100
);
int
updatepause
=
conf
->
getArgPInt
(
"--"
+
prefix
+
"-updatepause"
,
it
.
getProp
(
"updatepause"
),
100
);
...
...
include/CommonEventLoop.h
View file @
4c2c1f7d
...
...
@@ -67,7 +67,7 @@ namespace uniset
* Даже если thread = false, но wather не сможет быть "активирован" функция вернёт управление
* с return false.
*/
bool
evrun
(
EvWatcher
*
w
,
bool
thread
=
true
,
size_t
waitPrepareTimeout_msec
=
1
5000
);
bool
evrun
(
EvWatcher
*
w
,
bool
thread
=
true
,
size_t
waitPrepareTimeout_msec
=
5000
);
/*! \return TRUE - если это был последний EvWatcher и loop остановлен */
bool
evstop
(
EvWatcher
*
w
);
...
...
include/Configuration.h
View file @
4c2c1f7d
...
...
@@ -124,6 +124,7 @@ namespace uniset
timeout_t
getHeartBeatTime
()
const
noexcept
;
timeout_t
getNCReadyTimeout
()
const
noexcept
;
timeout_t
getStartupIgnoreTimeout
()
const
noexcept
;
// dirs
const
std
::
string
getConfDir
()
const
noexcept
;
...
...
@@ -235,6 +236,7 @@ namespace uniset
timeout_t
heartbeat_msec
=
{
3000
};
timeout_t
ncreadytimeout_msec
=
{
180000
};
timeout_t
startupIgnoretimeout_msec
=
{
5000
};
};
/*! Глобальный указатель на конфигурацию (singleton) */
...
...
src/Various/Configuration.cc
View file @
4c2c1f7d
...
...
@@ -687,6 +687,20 @@ namespace uniset
else
if
(
ncreadytimeout_msec
==
0
)
ncreadytimeout_msec
=
180000
;
}
// startup ingore timeout init...
cnode
=
getNode
(
"StartUpIgnoreTimeout"
);
if
(
cnode
)
{
UniXML
::
iterator
hit
(
cnode
);
startupIgnoretimeout_msec
=
hit
.
getIntProp
(
"msec"
);
if
(
startupIgnoretimeout_msec
<
0
)
startupIgnoretimeout_msec
=
UniSetTimer
::
WaitUpTime
;
else
if
(
startupIgnoretimeout_msec
==
0
)
startupIgnoretimeout_msec
=
5000
;
}
}
// -------------------------------------------------------------------------
void
Configuration
::
setLocalNode
(
const
string
&
nodename
)
...
...
@@ -1270,6 +1284,11 @@ namespace uniset
{
return
ncreadytimeout_msec
;
}
timeout_t
Configuration
::
getStartupIgnoreTimeout
()
const
noexcept
{
return
startupIgnoretimeout_msec
;
}
// -------------------------------------------------------------------------
const
string
Configuration
::
getConfDir
()
const
noexcept
{
...
...
tests/test_conftest.cc
View file @
4c2c1f7d
...
...
@@ -79,6 +79,7 @@ TEST_CASE( "Configuration", "[Configuration]" )
REQUIRE
(
conf
->
getCountOfNet
()
==
1
);
REQUIRE
(
conf
->
getRepeatCount
()
==
3
);
REQUIRE
(
conf
->
getRepeatTimeout
()
==
50
);
REQUIRE
(
conf
->
getStartupIgnoreTimeout
()
==
6000
);
}
SECTION
(
"Empty Constructor"
)
...
...
tests/tests_with_conf.xml
View file @
4c2c1f7d
...
...
@@ -23,6 +23,7 @@
<HeartBeatTime
msec=
"2000"
/>
<NCReadyTimeout
msec=
"60000"
/>
<StartUpIgnoreTimeout
msec=
"6000"
/>
<!-- Если не указано, то считается текущий каталог -->
<ConfDir
name=
""
/>
...
...
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