Improve per on price update
Some checks failed
Build & Deploy / build-and-deploy (push) Has been cancelled
.NET / build (push) Has been cancelled

This commit is contained in:
2025-08-16 17:02:31 +07:00
parent 750f6cebbb
commit 955c358138
5 changed files with 27 additions and 22 deletions

View File

@@ -23,6 +23,13 @@ public class InfluxDbRepository : IInfluxDbRepository
action(write);
}
public Task WriteAsync(Func<WriteApi, Task> action)
{
// Get write API asynchronously
using var client = new InfluxDBClient(_url, _token);
using var write = client.GetWriteApi();
return action(write);
}
public async Task<T> QueryAsync<T>(Func<QueryApi, Task<T>> action)
{
using var client = InfluxDBClientFactory.Create(_url, _token);