CS2-6: Изменено имя метода получения uids передеющих скважин

This commit is contained in:
KharchenkoVV 2021-05-14 10:58:23 +05:00
parent 026fbea529
commit 0bfec5dcb1
4 changed files with 8 additions and 8 deletions

View File

@ -5,6 +5,6 @@ namespace AsbCloudApp.Services
public interface ITelemetryTracker
{
void SaveRequestDate(string uid);
IEnumerable<string> GetRequestUids();
IEnumerable<string> GetTransmittingTelemetryUids();
}
}

View File

@ -21,7 +21,7 @@ namespace AsbCloudInfrastructure.Services
DeleteOldRequestDates();
}
public IEnumerable<string> GetRequestUids()
public IEnumerable<string> GetTransmittingTelemetryUids()
{
DeleteOldRequestDates();
return requests.Keys;

View File

@ -21,7 +21,7 @@ namespace AsbCloudInfrastructure.Services
public IEnumerable<WellDto> GetTransmittingWells(int idCustomer)
{
var wells = new List<Well>();
IEnumerable<string> activeTelemetriesUids = telemetryTracker.GetRequests();
IEnumerable<string> activeTelemetriesUids = telemetryTracker.GetTransmittingTelemetryUids();
if (activeTelemetriesUids.Count() > 0)
{
wells = db.GetWellsByCustomer(idCustomer)

View File

@ -53,7 +53,7 @@ namespace AsbCloudWebApi.Controllers
public IActionResult PostInfo(string uid, [FromBody] TelemetryInfoDto info)
{
telemetryService.UpdateInfo(uid, info);
telemetryTracker.SaveRequest(uid);
telemetryTracker.SaveRequestDate(uid);
return Ok();
}
@ -73,7 +73,7 @@ namespace AsbCloudWebApi.Controllers
if (wellId != null && dtos.Any())
Task.Run(() => telemetryHubContext.Clients.Group($"well_{wellId}").SendAsync(nameof(ITelemetryHubClient.ReceiveDataSaub), dtos));
telemetryTracker.SaveRequest(uid);
telemetryTracker.SaveRequestDate(uid);
return Ok();
}
@ -93,7 +93,7 @@ namespace AsbCloudWebApi.Controllers
if (dtos.Any())
Task.Run(() => telemetryHubContext.Clients.Group($"well_{wellId}").SendAsync(nameof(ITelemetryHubClient.ReceiveMessages), dtos));
telemetryTracker.SaveRequest(uid);
telemetryTracker.SaveRequestDate(uid);
return Ok();
}
@ -108,7 +108,7 @@ namespace AsbCloudWebApi.Controllers
public IActionResult PostEvents(string uid, [FromBody] List<EventDto> events)
{
eventService.Upsert(uid, events);
telemetryTracker.SaveRequest(uid);
telemetryTracker.SaveRequestDate(uid);
return Ok();
}
@ -123,7 +123,7 @@ namespace AsbCloudWebApi.Controllers
public IActionResult PostUsers(string uid, [FromBody] List<TelemetryUserDto> users)
{
telemetryUserService.Upsert(uid, users);
telemetryTracker.SaveRequest(uid);
telemetryTracker.SaveRequestDate(uid);
return Ok();
}