Skip to content
Snippets Groups Projects
Commit 75e02fe6 authored by Marcel Nellesen's avatar Marcel Nellesen
Browse files

Merge branch 'Sprint/2020-20' into 'master'

Sprint/2020 20

See merge request coscine/cs/kpi-generator!4
parents 8d6500ac 23c7e0ac
Branches
Tags v1.1.1
1 merge request!4Sprint/2020 20
Pipeline #445200 passed
...@@ -22,6 +22,8 @@ namespace Coscine.KpiGenerator ...@@ -22,6 +22,8 @@ namespace Coscine.KpiGenerator
ConsulConfiguration configuration = new ConsulConfiguration(); ConsulConfiguration configuration = new ConsulConfiguration();
DataConnection.DefaultSettings = new CoscineSettings(configuration); DataConnection.DefaultSettings = new CoscineSettings(configuration);
var liveMode = configuration.GetStringAndWait("coscine/global/reporting/live");
// Run all Generators for the KPI // Run all Generators for the KPI
// each Generator returns a list of KPI, it can have zero entries. // each Generator returns a list of KPI, it can have zero entries.
List<Kpi> newKpis = new List<Kpi>(); List<Kpi> newKpis = new List<Kpi>();
...@@ -43,7 +45,10 @@ namespace Coscine.KpiGenerator ...@@ -43,7 +45,10 @@ namespace Coscine.KpiGenerator
// try to sent them as a bundle with the csv method // try to sent them as a bundle with the csv method
HamsterReporter hamsterReporter = new HamsterReporter(configuration); HamsterReporter hamsterReporter = new HamsterReporter(configuration);
if (liveMode == "1")
{
hamsterReporter.Send(kpiToProcess); hamsterReporter.Send(kpiToProcess);
}
// if the kpi were sent successful mark all values within the database as successfully sent // if the kpi were sent successful mark all values within the database as successfully sent
foreach (Kpi kpi in kpiToProcess) foreach (Kpi kpi in kpiToProcess)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment