Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
HdbTdbArchivingServers
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Software Control System
Tango controls archiving
HdbTdbArchivingServers
Commits
e2dda4d1
Commit
e2dda4d1
authored
8 months ago
by
gwen-soleil
Browse files
Options
Downloads
Patches
Plain Diff
fix regression: conversion legacy class to new class for managing was not working.
parent
fdc63bbd
No related branches found
Tags
release_1_2_6
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
hdbarchiver/src/main/java/org/tango/archiving/collector/infra/ArchivingDatabase.java
+12
-0
12 additions, 0 deletions
...rg/tango/archiving/collector/infra/ArchivingDatabase.java
with
12 additions
and
0 deletions
hdbarchiver/src/main/java/org/tango/archiving/collector/infra/ArchivingDatabase.java
+
12
−
0
View file @
e2dda4d1
...
...
@@ -23,6 +23,8 @@ import fr.soleil.tango.archiving.config.AttributeConfig;
import
fr.soleil.tango.archiving.config.InsertionModes
;
import
fr.soleil.tango.archiving.infra.tango.ArchivingConfig
;
import
fr.soleil.tango.archiving.infra.tango.ArchivingConfigs
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.tango.archiving.collector.data.ArchivingKPI
;
import
org.tango.archiving.collector.data.AttributeScalarEvent
;
import
org.tango.archiving.collector.data.ImageEventRO
;
...
...
@@ -35,6 +37,7 @@ public class ArchivingDatabase implements IArchivingDatabase {
private
final
DataBaseManager
dataBaseManager
;
private
final
IArchivingManagerApiRef
manager
;
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
ArchivingDatabase
.
class
);
private
IHdbAttributeInsert
inserter
;
...
...
@@ -78,6 +81,8 @@ public class ArchivingDatabase implements IArchivingDatabase {
@Override
public
void
registerAttributeMode
(
final
ArchivingConfig
config
)
throws
ArchivingException
{
logger
.
warn
(
"registerAttributeMode {}"
,
config
.
getAttributeConfig
().
getFullName
());
System
.
out
.
println
(
"registerAttributeMode "
+
config
.
getAttributeConfig
().
getFullName
());
AttributeLightMode
lightMode
=
new
AttributeLightMode
();
lightMode
.
setAttributeCompleteName
(
config
.
getAttributeConfig
().
getFullName
());
lightMode
.
setDevice_in_charge
(
config
.
getArchiver
());
...
...
@@ -115,6 +120,7 @@ public class ArchivingDatabase implements IArchivingDatabase {
mode
.
setEventMode
(
new
EventMode
());
}
lightMode
.
setMode
(
mode
);
logger
.
debug
(
"registerAttributeMode lightMode = {}"
,
lightMode
);
dataBaseManager
.
getMode
().
insertModeRecord
(
lightMode
);
}
...
...
@@ -170,6 +176,7 @@ public class ArchivingDatabase implements IArchivingDatabase {
throw
new
ArchivingException
(
e
);
}
for
(
AttributeLightMode
mode
:
legacyTasks
)
{
logger
.
debug
(
"AttributeLightMode {}"
,
mode
);
ArchivingConfig
config
=
new
ArchivingConfig
();
AttributeConfig
attribute
=
new
AttributeConfig
();
attribute
.
setFullName
(
mode
.
getAttributeCompleteName
());
...
...
@@ -177,20 +184,24 @@ public class ArchivingDatabase implements IArchivingDatabase {
attribute
.
setWriteType
(
mode
.
getWritable
());
config
.
setAttributeConfig
(
attribute
);
InsertionModes
modes
=
new
InsertionModes
();
modes
.
setAttributeName
(
mode
.
getAttributeCompleteName
());
if
(
mode
.
getMode
().
getModeP
()
!=
null
)
{
modes
.
setPeriodic
(
true
);
modes
.
setPeriodPeriodic
(
mode
.
getMode
().
getModeP
().
getPeriod
());
}
if
(
mode
.
getMode
().
getModeA
()
!=
null
)
{
modes
.
setAbsolute
(
true
);
modes
.
setPeriodAbsolute
(
mode
.
getMode
().
getModeA
().
getPeriod
());
modes
.
setSlowDriftAbsolute
(
mode
.
getMode
().
getModeA
().
isSlow_drift
());
modes
.
setDecreaseDeltaAbsolute
(
mode
.
getMode
().
getModeA
().
getValInf
());
modes
.
setIncreaseDeltaAbsolute
(
mode
.
getMode
().
getModeA
().
getValSup
());
}
if
(
mode
.
getMode
().
getModeD
()
!=
null
)
{
modes
.
setDifference
(
true
);
modes
.
setPeriodDifference
(
mode
.
getMode
().
getModeD
().
getPeriod
());
}
if
(
mode
.
getMode
().
getModeR
()
!=
null
)
{
modes
.
setRelative
(
true
);
modes
.
setPeriodRelative
(
mode
.
getMode
().
getModeR
().
getPeriod
());
modes
.
setSlowDriftRelative
(
mode
.
getMode
().
getModeR
().
isSlow_drift
());
modes
.
setDecreasePercentRelative
(
mode
.
getMode
().
getModeR
().
getPercentInf
());
...
...
@@ -200,6 +211,7 @@ public class ArchivingDatabase implements IArchivingDatabase {
modes
.
setEvent
(
true
);
}
config
.
setModes
(
modes
);
logger
.
debug
(
"getArchiverCurrentTasks {}"
,
config
);
archiverCurrentTasks
.
addConfiguration
(
config
);
}
return
archiverCurrentTasks
;
...
...
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