瀏覽代碼

bug fix.

master
Savorboard 7 年之前
父節點
當前提交
3cb24090b9
共有 2 個檔案被更改,包括 3 行新增1 行删除
  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 查看文件

@@ -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 查看文件

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

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



Loading…
取消
儲存