forked from ddrilling/AsbCloudServer
CS2-6: Изменено имя метода получения uids передеющих скважин
This commit is contained in:
parent
026fbea529
commit
0bfec5dcb1
@ -5,6 +5,6 @@ namespace AsbCloudApp.Services
|
||||
public interface ITelemetryTracker
|
||||
{
|
||||
void SaveRequestDate(string uid);
|
||||
IEnumerable<string> GetRequestUids();
|
||||
IEnumerable<string> GetTransmittingTelemetryUids();
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ namespace AsbCloudInfrastructure.Services
|
||||
DeleteOldRequestDates();
|
||||
}
|
||||
|
||||
public IEnumerable<string> GetRequestUids()
|
||||
public IEnumerable<string> GetTransmittingTelemetryUids()
|
||||
{
|
||||
DeleteOldRequestDates();
|
||||
return requests.Keys;
|
||||
|
@ -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)
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user