Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tango
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOFAR2.0
tango
Commits
5a6e97e1
Commit
5a6e97e1
authored
3 years ago
by
Stefano Di Frischia
Browse files
Options
Downloads
Patches
Plain Diff
L2SS-235
: add exception catching if containers are offline
parent
db1b775a
No related branches found
No related tags found
1 merge request
!108
Resolve L2SS-235 "Archive pcc attribute"
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
devices/toolkit/archiver.py
+10
-1
10 additions, 1 deletion
devices/toolkit/archiver.py
with
10 additions
and
1 deletion
devices/toolkit/archiver.py
+
10
−
1
View file @
5a6e97e1
...
@@ -18,6 +18,15 @@ class Archiver():
...
@@ -18,6 +18,15 @@ class Archiver():
def
__init__
(
self
,
cm_name
:
str
=
'
archiving/hdbpp/confmanager01
'
,
es_name
:
str
=
'
archiving/hdbpp/eventsubscriber01
'
,
context
:
str
=
'
RUN
'
):
def
__init__
(
self
,
cm_name
:
str
=
'
archiving/hdbpp/confmanager01
'
,
es_name
:
str
=
'
archiving/hdbpp/eventsubscriber01
'
,
context
:
str
=
'
RUN
'
):
self
.
cm_name
=
cm_name
self
.
cm_name
=
cm_name
self
.
cm
=
DeviceProxy
(
cm_name
)
self
.
cm
=
DeviceProxy
(
cm_name
)
try
:
cm_state
=
self
.
cm
.
state
()
# ping the device server
if
cm_state
is
'
FAULT
'
:
print
(
'
Configuration Manager is in FAULT state
'
)
print
(
self
.
cm
.
status
())
return
except
:
print
(
traceback
.
format_exc
())
return
self
.
es_name
=
es_name
self
.
es_name
=
es_name
self
.
es
=
DeviceProxy
(
es_name
)
self
.
es
=
DeviceProxy
(
es_name
)
self
.
cm
.
write_attribute
(
'
Context
'
,
context
)
# Set default Context Archiving for all the subscribers
self
.
cm
.
write_attribute
(
'
Context
'
,
context
)
# Set default Context Archiving for all the subscribers
...
@@ -195,7 +204,7 @@ class Archiver():
...
@@ -195,7 +204,7 @@ class Archiver():
return
errs_dict
.
get
(
e
)
return
errs_dict
.
get
(
e
)
return
None
return
None
def
get_subscriber_load
(
self
,
use_freq
=
True
,
es_name
:
str
=
None
):
def
get_subscriber_load
(
self
,
use_freq
:
bool
=
True
,
es_name
:
str
=
None
):
"""
"""
Return the estimated load of an archiver, in frequency of records or number
Return the estimated load of an archiver, in frequency of records or number
of attributes
of attributes
...
...
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