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
6ab93f68
Commit
6ab93f68
authored
6 years ago
by
Fabrice Le Goff
Browse files
Options
Downloads
Patches
Plain Diff
set timeout for DdmMonitoringThread's operations
parent
3a0e41b5
No related branches found
No related tags found
No related merge requests found
Pipeline
#586035
passed
6 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Script/DdmMonitoringThread.py
+7
-2
7 additions, 2 deletions
Script/DdmMonitoringThread.py
with
7 additions
and
2 deletions
Script/DdmMonitoringThread.py
+
7
−
2
View file @
6ab93f68
...
...
@@ -66,7 +66,7 @@ class DdmMonitoringThread(threading.Thread):
try
:
req
=
urllib2
.
Request
(
self
.
conf
.
DdmMonitoringEndpoint
)
req
.
add_header
(
'
Content-Type
'
,
'
application/json
'
)
urllib2
.
urlopen
(
req
,
json
.
dumps
(
data
))
urllib2
.
urlopen
(
req
,
json
.
dumps
(
data
)
,
timeout
=
self
.
conf
.
DdmMonitoringTimeout
)
self
.
logger
.
debug
(
'
published entry for %s: %s
'
,
data
[
'
filename
'
],
json
.
dumps
(
data
))
...
...
@@ -85,7 +85,12 @@ class DdmMonitoringThread(threading.Thread):
else
:
self
.
logger
.
debug
(
'
will retry to publish data for %s
'
,
data
[
'
filename
'
])
self
.
DdmMonitoringQueue
.
put
(
data
)
try
:
self
.
DdmMonitoringQueue
.
put
(
data
,
block
=
True
,
timeout
=
self
.
conf
.
DdmMonitoringTimeout
)
except
Queue
.
Full
:
self
.
logger
.
warning
(
'
could not put entry back in the queue for %s:
'
'
timeout, queue is full
'
,
data
[
'
filename
'
])
if
self
.
requestErrorSince
is
None
:
self
.
requestErrorSince
=
time
.
time
()
...
...
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