Skip to content
Snippets Groups Projects
Commit afb89d39 authored by Benedikt Heinrichs's avatar Benedikt Heinrichs
Browse files

Mark KPI as sent when they are successfully sent (coscine/issues#1424)

parent 7905a050
No related tags found
1 merge request!5Fix: Working KPI Generator
Pipeline #451106 passed
......@@ -44,12 +44,6 @@ namespace Coscine.KpiGenerator
{
hamsterReporter.Send(kpiToProcess);
}
// if the kpi were sent successful mark all values within the database as successfully sent
foreach (Kpi kpi in kpiToProcess)
{
kpiModel.MarkAsSent(kpi);
}
}
}
}
using Coscine.Configuration;
using Coscine.Database.DataModel;
using Coscine.Database.Models;
using System;
using System.Collections.Generic;
......@@ -23,6 +24,8 @@ namespace Coscine.KpiGenerator.Reporter
public void Send(List<Kpi> kpis)
{
// when all generators are done
var kpiModel = new KpiModel();
foreach (var kpi in kpis)
{
var values = $"login={_name}&password={_password}";
......@@ -38,6 +41,10 @@ namespace Coscine.KpiGenerator.Reporter
{
Console.Error.WriteLine(result);
}
else
{
kpiModel.MarkAsSent(kpi);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment