Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
KirillKurdyukov committed Aug 14, 2024
1 parent d1f80ae commit f98330f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
5 changes: 2 additions & 3 deletions slo/src/AdoNet/SloContext.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Diagnostics;
using Internal;
using Internal.Cli;
using Polly;
Expand Down Expand Up @@ -69,7 +68,7 @@ protected override async Task Create(YdbDataSource client, string createTableSql
{
context["errorsGauge"] = errorsGauge;
}

var policyResult = await _policy.ExecuteAndCaptureAsync(async _ =>
{
await using var ydbConnection = await dataSource.OpenConnectionAsync();
Expand All @@ -84,7 +83,7 @@ protected override async Task Create(YdbDataSource client, string createTableSql
return await ydbCommand.ExecuteScalarAsync();
}, context);

return (policyResult.Context.TryGetValue("RetryCount", out var countAttempts) ? (int)countAttempts : 1,
((YdbException)policyResult.FinalException)?.Code ?? StatusCode.Success, policyResult.Result);
}
Expand Down
1 change: 0 additions & 1 deletion slo/src/Internal/Jobs/Job.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Diagnostics;
using Prometheus;
using Ydb.Sdk;

namespace Internal.Jobs;

Expand Down
4 changes: 2 additions & 2 deletions slo/src/Internal/SloContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public async Task Run(RunConfig runConfig)

await prometheus.StopAsync();
await MetricReset(promPgwEndpoint);

_logger.LogInformation("Run task is finished");
return;

Expand Down Expand Up @@ -242,7 +242,7 @@ Task ShootingTask(RateLimitPolicy rateLimitPolicy, string shootingName,

return (attempts, code);
}

private async Task MetricReset(string promPgwEndpoint)
{
var deleteUri = $"{promPgwEndpoint}/job/{JobName}";
Expand Down
1 change: 0 additions & 1 deletion slo/src/TableService/SloContext.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Internal;
using Internal.Cli;
using Microsoft.Extensions.Logging;
using Prometheus;
using Ydb.Sdk;
using Ydb.Sdk.Services.Table;
Expand Down

0 comments on commit f98330f

Please sign in to comment.