using Dapper;using Npgsql;
namespace Kbx.Shared.Telemetry;
public sealed class PurgeUxTelemetryJob(NpgsqlDataSource dataSource)
{
    public async Task ExecuteAsync(CancellationToken ct)
    {
        await using var connection=await dataSource.OpenConnectionAsync(ct);
        await connection.ExecuteAsync(new CommandDefinition("delete from kbx.ux_events where occurred_at < now() - interval '90 days';",cancellationToken:ct));
    }
}
