Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CastorScript
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
atlas-tdaq-software
CastorScript
Commits
30b01cf1
Commit
30b01cf1
authored
13 years ago
by
Lukas Fritz Marti
Browse files
Options
Downloads
Patches
Plain Diff
Added timeout before adding ERS handlers when a partition starting up is found.
parent
15e36b19
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Script/CheckThread.py
+3
-7
3 additions, 7 deletions
Script/CheckThread.py
Script/Conf.cfg
+5
-2
5 additions, 2 deletions
Script/Conf.cfg
Script/Conf.py
+2
-0
2 additions, 0 deletions
Script/Conf.py
with
10 additions
and
9 deletions
Script/CheckThread.py
+
3
−
7
View file @
30b01cf1
...
...
@@ -32,6 +32,7 @@ class CheckThread(threading.Thread):
self
.
ERS_enabled
=
self
.
conf
.
ERS_enabled
self
.
partition
=
self
.
conf
.
partition
self
.
LogLevel
=
self
.
conf
.
LogLevel
self
.
ERSTimeout
=
self
.
conf
.
ERSTimeout
##### Define Thread internal variables #####
self
.
exitFlag
=
False
...
...
@@ -71,6 +72,7 @@ class CheckThread(threading.Thread):
##### Check for a new partition #####
if
IPCPartition
(
self
.
partition
).
isValid
()
and
not
self
.
ers_flag
:
self
.
event
.
wait
(
self
.
ERSTimeout
)
self
.
logInfo
=
{
'
file
'
:
self
.
check_logger
.
findCaller
()[
0
],
'
line
'
:
self
.
check_logger
.
findCaller
()[
1
]}
self
.
check_logger
.
info
(
'
Found partition %s, adding ERS
'
%
self
.
partition
,
extra
=
self
.
logInfo
)
self
.
ers_flag
=
True
...
...
@@ -85,14 +87,8 @@ class CheckThread(threading.Thread):
self
.
ers_flag
=
False
##### Remove ERS handlers from all loggers #####
self
.
change_state_ers
(
False
)
#print "checkloggers handlers", self.check_logger.handlers
#print "copythreads handlers", self.copy.logger.handlers
#print "del threads handlers", self.delete.logger.handlers
#print "managers handlers", self.manager.logger.handlers
#print "main's loggers handlers", self.logger.handlers
self
.
event
.
wait
(
self
.
CheckTimeout
)
# end while
# end def run()
...
...
This diff is collapsed.
Click to expand it.
Script/Conf.cfg
+
5
−
2
View file @
30b01cf1
...
...
@@ -192,5 +192,8 @@ DeleteTimeout: 2
MigDelay:
600
##########
CHECK THREAD ##########
# Time
between checks for partition
CheckTimeout:
2
# Time
(s) between checks for partition
CheckTimeout:
1
# Timout
(s) before adding the ERS handler
ERSTimeout:
10
This diff is collapsed.
Click to expand it.
Script/Conf.py
+
2
−
0
View file @
30b01cf1
...
...
@@ -211,3 +211,5 @@ class Conf:
########## CHECK THREAD ##########
self
.
CheckTimeout
=
cfg
.
CheckTimeout
self
.
ERSTimeout
=
cfg
.
ERSTimeout
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment