Browse Source

bug fix.

master
Savorboard 7 years ago
parent
commit
3cb24090b9
2 changed files with 3 additions and 1 deletions
  1. +2
    -1
      src/DotNetCore.CAP.MySql/IAdditionalProcessor.Default.cs
  2. +1
    -0
      src/DotNetCore.CAP.MySql/MySqlStorage.cs

+ 2
- 1
src/DotNetCore.CAP.MySql/IAdditionalProcessor.Default.cs View File

@@ -4,6 +4,7 @@ using System.Threading.Tasks;
using Dapper;
using DotNetCore.CAP.Processor;
using Microsoft.Extensions.Logging;
using MySql.Data.MySqlClient;

namespace DotNetCore.CAP.MySql
{
@@ -41,7 +42,7 @@ namespace DotNetCore.CAP.MySql
var removedCount = 0;
do
{
using (var connection = new SqlConnection(_options.ConnectionString))
using (var connection = new MySqlConnection(_options.ConnectionString))
{
removedCount = await connection.ExecuteAsync($@"DELETE FROM `{table}` WHERE ExpiresAt < @now limit @count;",
new { now = DateTime.Now, count = MaxBatch });


+ 1
- 0
src/DotNetCore.CAP.MySql/MySqlStorage.cs View File

@@ -26,6 +26,7 @@ namespace DotNetCore.CAP.MySql
{
await connection.ExecuteAsync(sql);
}

_logger.LogDebug("Ensuring all create database tables script are applied.");
}



Loading…
Cancel
Save