From 3719c92224c6761fdcc6e0cee778dc99bd9d0615 Mon Sep 17 00:00:00 2001 From: keke Date: Wed, 19 Dec 2018 14:58:36 +0800 Subject: [PATCH] Fix that Version doesn't match (#253) --- .../ICollectProcessor.MongoDB.cs | 12 ++++++------ .../IStorageTransaction.MongoDB.cs | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/DotNetCore.CAP.MongoDB/ICollectProcessor.MongoDB.cs b/src/DotNetCore.CAP.MongoDB/ICollectProcessor.MongoDB.cs index 6b19878..d807598 100644 --- a/src/DotNetCore.CAP.MongoDB/ICollectProcessor.MongoDB.cs +++ b/src/DotNetCore.CAP.MongoDB/ICollectProcessor.MongoDB.cs @@ -31,18 +31,18 @@ namespace DotNetCore.CAP.MongoDB _logger.LogDebug( $"Collecting expired data from collection [{_options.PublishedCollection}]."); - var publishedCollection = _database.GetCollection(_options.PublishedCollection); - var receivedCollection = _database.GetCollection(_options.ReceivedCollection); + var publishedCollection = _database.GetCollection(_options.PublishedCollection); + var receivedCollection = _database.GetCollection(_options.ReceivedCollection); await publishedCollection.BulkWriteAsync(new[] { - new DeleteManyModel( - Builders.Filter.Lt(x => x.ExpiresAt, DateTime.Now)) + new DeleteManyModel( + Builders.Filter.Lt(x => x.ExpiresAt, DateTime.Now)) }); await receivedCollection.BulkWriteAsync(new[] { - new DeleteManyModel( - Builders.Filter.Lt(x => x.ExpiresAt, DateTime.Now)) + new DeleteManyModel( + Builders.Filter.Lt(x => x.ExpiresAt, DateTime.Now)) }); await context.WaitAsync(_waitingInterval); diff --git a/src/DotNetCore.CAP.MongoDB/IStorageTransaction.MongoDB.cs b/src/DotNetCore.CAP.MongoDB/IStorageTransaction.MongoDB.cs index a2b2390..7d1a22b 100644 --- a/src/DotNetCore.CAP.MongoDB/IStorageTransaction.MongoDB.cs +++ b/src/DotNetCore.CAP.MongoDB/IStorageTransaction.MongoDB.cs @@ -39,9 +39,9 @@ namespace DotNetCore.CAP.MongoDB throw new ArgumentNullException(nameof(message)); } - var collection = _database.GetCollection(_options.PublishedCollection); + var collection = _database.GetCollection(_options.PublishedCollection); - var updateDef = Builders.Update + var updateDef = Builders.Update .Set(x => x.Retries, message.Retries) .Set(x => x.Content, message.Content) .Set(x => x.ExpiresAt, message.ExpiresAt) @@ -57,9 +57,9 @@ namespace DotNetCore.CAP.MongoDB throw new ArgumentNullException(nameof(message)); } - var collection = _database.GetCollection(_options.ReceivedCollection); + var collection = _database.GetCollection(_options.ReceivedCollection); - var updateDef = Builders.Update + var updateDef = Builders.Update .Set(x => x.Retries, message.Retries) .Set(x => x.Content, message.Content) .Set(x => x.ExpiresAt, message.ExpiresAt)