forked from ddrilling/AsbCloudServer
remove unused methods
This commit is contained in:
parent
e0834e4720
commit
31b671a0c7
@ -15,7 +15,6 @@ namespace AsbCloudApp.Services
|
||||
int GetOrCreateTelemetryIdByUid(string uid);
|
||||
double GetTimezoneOffsetByTelemetryId(int idTelemetry);
|
||||
Task<double?> GetTelemetryTimeZoneOffsetAsync(int idTelemetry, CancellationToken token);
|
||||
IEnumerable<(string Key, int[] Ids)> GetDuplicateRemoteUids();
|
||||
IEnumerable<TelemetryDto> GetTransmittingTelemetries();
|
||||
DateTime GetLastTelemetryDate(string telemetryUid);
|
||||
DateTime GetLastTelemetryDate(int telemetryId);
|
||||
|
@ -216,16 +216,6 @@ namespace AsbCloudInfrastructure.Services
|
||||
private Telemetry GetOrCreateTelemetryByUid(string uid)
|
||||
=> cacheTelemetry.GetOrCreate(t => t.RemoteUid == uid, () => new Telemetry { RemoteUid = uid });
|
||||
|
||||
public IEnumerable<(string Key, int[] Ids)> GetDuplicateRemoteUids()
|
||||
{
|
||||
return db.Telemetries
|
||||
.ToList()
|
||||
.GroupBy(t => t.RemoteUid)
|
||||
.Where(g => g.Count() > 1)
|
||||
.Select(g => (g.Key, g.Select(t=>t.Id).ToArray()));
|
||||
}
|
||||
|
||||
|
||||
public async Task<int> MergeAsync(int from, int to, CancellationToken token)
|
||||
{
|
||||
if (from == to)
|
||||
|
@ -2,8 +2,6 @@
|
||||
using AsbCloudApp.Services;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@ -24,17 +22,8 @@ namespace AsbCloudWebApi.Controllers
|
||||
this.telemetryService = telemetryService;
|
||||
}
|
||||
|
||||
|
||||
[HttpGet]
|
||||
[Route("/reduntentUids")]
|
||||
public IActionResult GetRedundentRemoteUids()
|
||||
{
|
||||
var result = telemetryService.GetDuplicateRemoteUids().Select(i => new { i.Key, ids = i.Ids });
|
||||
return Ok(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// merge telemetries
|
||||
/// Merge telemetries. No body required.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
|
Loading…
Reference in New Issue
Block a user