Browse Source

reduce dependent nuget packages

master
Savorboard 6 years ago
parent
commit
32b64ac135
7 changed files with 6 additions and 22 deletions
  1. +1
    -5
      src/DotNetCore.CAP.MongoDB/MongoDBStorageConnection.cs
  2. +1
    -5
      src/DotNetCore.CAP.MySql/IStorageConnection.MySql.cs
  3. +1
    -3
      src/DotNetCore.CAP.PostgreSql/IStorageTransaction.PostgreSql.cs
  4. +0
    -1
      src/DotNetCore.CAP/CAP.ServiceCollectionExtensions.cs
  5. +0
    -3
      src/DotNetCore.CAP/DotNetCore.CAP.csproj
  6. +1
    -2
      src/DotNetCore.CAP/IStorageConnection.cs
  7. +2
    -3
      src/DotNetCore.CAP/Processor/IProcessor.NeedRetry.cs

+ 1
- 5
src/DotNetCore.CAP.MongoDB/MongoDBStorageConnection.cs View File

@@ -105,10 +105,6 @@ namespace DotNetCore.CAP.MongoDB
var collection = _database.GetCollection<CapReceivedMessage>(_options.ReceivedCollection);

collection.InsertOne(message);
}

public void Dispose()
{
}
}
}
}

+ 1
- 5
src/DotNetCore.CAP.MySql/IStorageConnection.MySql.cs View File

@@ -109,10 +109,6 @@ VALUES(@Id,@Name,@Group,@Content,@Retries,@Added,@ExpiresAt,@StatusName);";
{
return connection.Execute(sql) > 0;
}
}

public void Dispose()
{
}
}
}
}

+ 1
- 3
src/DotNetCore.CAP.PostgreSql/IStorageTransaction.PostgreSql.cs View File

@@ -47,9 +47,7 @@ namespace DotNetCore.CAP.PostgreSql
}

var sql =
$@"UPDATE ""{
_schema
}"".""received"" SET ""Retries""=@Retries,""Content""= @Content,""ExpiresAt""=@ExpiresAt,""StatusName""=@StatusName WHERE ""Id""=@Id;";
$@"UPDATE ""{_schema}"".""received"" SET ""Retries""=@Retries,""Content""= @Content,""ExpiresAt""=@ExpiresAt,""StatusName""=@StatusName WHERE ""Id""=@Id;";
_dbConnection.Execute(sql, message, _dbTransaction);
}



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

@@ -34,7 +34,6 @@ namespace Microsoft.Extensions.DependencyInjection
}

services.TryAddSingleton<CapMarkerService>();
services.Configure(setupAction);

//Consumer service
AddSubscribeServices(services);


+ 0
- 3
src/DotNetCore.CAP/DotNetCore.CAP.csproj View File

@@ -34,12 +34,9 @@
<PackageReference Include="Consul" Version="0.7.2.6" />
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.1.0" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="4.5.0" />
<PackageReference Include="System.Threading.ThreadPool" Version="4.3.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.1.0" />
</ItemGroup>


+ 1
- 2
src/DotNetCore.CAP/IStorageConnection.cs View File

@@ -1,7 +1,6 @@
// Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using DotNetCore.CAP.Models;
@@ -11,7 +10,7 @@ namespace DotNetCore.CAP
/// <summary>
/// Represents a connection to the storage.
/// </summary>
public interface IStorageConnection : IDisposable
public interface IStorageConnection
{
//Sent messages



+ 2
- 3
src/DotNetCore.CAP/Processor/IProcessor.NeedRetry.cs View File

@@ -4,7 +4,6 @@
using System;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;

namespace DotNetCore.CAP.Processor
{
@@ -16,13 +15,13 @@ namespace DotNetCore.CAP.Processor
private readonly TimeSpan _waitingInterval;

public NeedRetryMessageProcessor(
IOptions<CapOptions> options,
CapOptions options,
ISubscriberExecutor subscriberExecutor,
IPublishMessageSender publishMessageSender)
{
_subscriberExecutor = subscriberExecutor;
_publishMessageSender = publishMessageSender;
_waitingInterval = TimeSpan.FromSeconds(options.Value.FailedRetryInterval);
_waitingInterval = TimeSpan.FromSeconds(options.FailedRetryInterval);
}

public async Task ProcessAsync(ProcessingContext context)


Loading…
Cancel
Save