Savorboard пре 6 година
родитељ
комит
82e43964d3
4 измењених фајлова са 2 додато и 8 уклоњено
  1. +1
    -1
      src/DotNetCore.CAP.MySql/CapPublisher.cs
  2. +0
    -5
      src/DotNetCore.CAP.MySql/MySqlStorageTransaction.cs
  3. +1
    -1
      src/DotNetCore.CAP/IConsumerHandler.Default.cs
  4. +0
    -1
      src/DotNetCore.CAP/Models/CapReceivedMessage.cs

+ 1
- 1
src/DotNetCore.CAP.MySql/CapPublisher.cs Прегледај датотеку

@@ -73,7 +73,7 @@ namespace DotNetCore.CAP.MySql
private string PrepareSql()
{
return
$"INSERT INTO `{_options.TableNamePrefix}.published` (`Name`,`Content`,`Retries`,`Added`,`ExpiresAt`,`StatusName`)VALUES(@Name,@Content,@Retries,@Added,@ExpiresAt,@StatusName);SELECT LAST_INSERT_ID()";
$"INSERT INTO `{_options.TableNamePrefix}.published` (`Id`,`Name`,`Content`,`Retries`,`Added`,`ExpiresAt`,`StatusName`)VALUES(@Id,@Name,@Content,@Retries,@Added,@ExpiresAt,@StatusName);";
}

private IDbTransaction InitDbConnection()


+ 0
- 5
src/DotNetCore.CAP.MySql/MySqlStorageTransaction.cs Прегледај датотеку

@@ -14,7 +14,6 @@ namespace DotNetCore.CAP.MySql
{
private readonly IDbConnection _dbConnection;

//private readonly IDbTransaction _dbTransaction;
private readonly string _prefix;

public MySqlStorageTransaction(MySqlStorageConnection connection)
@@ -23,8 +22,6 @@ namespace DotNetCore.CAP.MySql
_prefix = options.TableNamePrefix;

_dbConnection = new MySqlConnection(options.ConnectionString);
// _dbConnection.Open(); for performance
// _dbTransaction = _dbConnection.BeginTransaction(IsolationLevel.ReadCommitted);
}

public void UpdateMessage(CapPublishedMessage message)
@@ -55,13 +52,11 @@ namespace DotNetCore.CAP.MySql
{
_dbConnection.Close();
_dbConnection.Dispose();
//_dbTransaction.Commit();
return Task.CompletedTask;
}

public void Dispose()
{
//_dbTransaction.Dispose();
_dbConnection.Dispose();
}
}

+ 1
- 1
src/DotNetCore.CAP/IConsumerHandler.Default.cs Прегледај датотеку

@@ -171,7 +171,7 @@ namespace DotNetCore.CAP

private void StoreMessage(CapReceivedMessage receivedMessage)
{
_connection.StoreReceivedMessageAsync(receivedMessage).GetAwaiter().GetResult();
_connection.StoreReceivedMessage(receivedMessage);
}

private (Guid, string) TracingBefore(string topic, string values)


+ 0
- 1
src/DotNetCore.CAP/Models/CapReceivedMessage.cs Прегледај датотеку

@@ -2,7 +2,6 @@
// Licensed under the MIT License. See License.txt in the project root for license information.

using System;
using DotNetCore.CAP.Infrastructure;

namespace DotNetCore.CAP.Models
{


Loading…
Откажи
Сачувај