Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • coscine/backend/scripts/kpi-generator-deprecated
1 result
Select Git revision
Show changes
Commits on Source (2)
......@@ -22,6 +22,8 @@ namespace Coscine.KpiGenerator
ConsulConfiguration configuration = new ConsulConfiguration();
DataConnection.DefaultSettings = new CoscineSettings(configuration);
var liveMode = configuration.GetStringAndWait("coscine/global/reporting/live");
// Run all Generators for the KPI
// each Generator returns a list of KPI, it can have zero entries.
List<Kpi> newKpis = new List<Kpi>();
......@@ -43,7 +45,10 @@ namespace Coscine.KpiGenerator
// try to sent them as a bundle with the csv method
HamsterReporter hamsterReporter = new HamsterReporter(configuration);
if (liveMode == "1")
{
hamsterReporter.Send(kpiToProcess);
}
// if the kpi were sent successful mark all values within the database as successfully sent
foreach (Kpi kpi in kpiToProcess)
......