feat: watchlist repository, remove ef core from all bot code

This commit is contained in:
sam 2024-10-28 02:14:41 +01:00
parent da4dfae27c
commit f0511a560c
Signed by: sam
GPG key ID: 5F3C3C1B3166639D
19 changed files with 155 additions and 97 deletions

View file

@ -43,7 +43,7 @@ public class DatabaseConnection(Guid id, ILogger logger, NpgsqlConnection inner)
DatabasePool.DecrementConnections();
var openFor = DateTimeOffset.UtcNow - _openTime;
_logger.Debug("Closing connection {ConnId}, open for {OpenFor}", ConnectionId, openFor);
_logger.Verbose("Closing connection {ConnId}, open for {OpenFor}", ConnectionId, openFor);
_hasClosed = true;
await inner.CloseAsync();
}
@ -53,7 +53,7 @@ public class DatabaseConnection(Guid id, ILogger logger, NpgsqlConnection inner)
CancellationToken cancellationToken
)
{
_logger.Debug("Beginning transaction on connection {ConnId}", ConnectionId);
_logger.Verbose("Beginning transaction on connection {ConnId}", ConnectionId);
return await inner.BeginTransactionAsync(isolationLevel, cancellationToken);
}