Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
ArchiveExtractor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
DG
ArchiveExtractor
Commits
6c3923c2
Commit
6c3923c2
authored
3 years ago
by
BRONES Romain
Browse files
Options
Downloads
Patches
Plain Diff
[ArchiveExtractor] Add retry on DevFailed
parent
24dffcff
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ArchiveExtractor.py
+18
-12
18 additions, 12 deletions
ArchiveExtractor.py
with
18 additions
and
12 deletions
ArchiveExtractor.py
+
18
−
12
View file @
6c3923c2
...
...
@@ -455,18 +455,24 @@ if __name__ == "__main__":
for
attr
in
attributes
:
logger
.
info
(
"
Extracting attribute %s...
"
%
attr
)
try
:
datevalue
=
query_ADB_BetweenDates
(
attr
,
args
.
dateStart
,
args
.
dateStop
,
extractor
)
# Add to result dictionnary
results
[
attr
]
=
datevalue
except
ValueError
as
e
:
logger
.
debug
(
"
ErrorMsg: %s
"
%
e
)
logger
.
warning
(
"
Failed to extract %s. Skipping...
"
%
attr
)
except
tango
.
CommunicationFailed
:
logger
.
warning
(
"
Failed to extract %s. Skipping...
"
%
attr
)
logger
.
error
(
"
The device %s might have crash.
\n
"
+
for
attempt
in
range
(
3
):
try
:
datevalue
=
query_ADB_BetweenDates
(
attr
,
args
.
dateStart
,
args
.
dateStop
,
extractor
)
# Add to result dictionnary
results
[
attr
]
=
datevalue
except
ValueError
as
e
:
logger
.
debug
(
"
ErrorMsg: %s
"
%
e
)
logger
.
warning
(
"
Failed to extract %s. Skipping...
"
%
attr
)
except
(
tango
.
CommunicationFailed
,
tango
.
DevFailed
)
as
e
:
# retry
logger
.
debug
(
"
ErrorMsg: %s
"
%
e
)
logger
.
warning
(
"
Failed to extract %s. Retry...
"
%
attr
)
break
else
:
logger
.
error
(
"
The device %s might have crash.
\n
"
%
extractor
+
"
You should check with Jive and probably restart with Astor.
\n
"
)
# Save all at each step
...
...
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