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)