소스 검색

Fix that Version doesn't match (#253)

master
keke 6 년 전
committed by Savorboard
부모
커밋
3719c92224
2개의 변경된 파일10개의 추가작업 그리고 10개의 파일을 삭제
  1. +6
    -6
      src/DotNetCore.CAP.MongoDB/ICollectProcessor.MongoDB.cs
  2. +4
    -4
      src/DotNetCore.CAP.MongoDB/IStorageTransaction.MongoDB.cs

+ 6
- 6
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<CapPublishedMessage>(_options.PublishedCollection);
var receivedCollection = _database.GetCollection<CapReceivedMessage>(_options.ReceivedCollection);
var publishedCollection = _database.GetCollection<PublishedMessage>(_options.PublishedCollection);
var receivedCollection = _database.GetCollection<ReceivedMessage>(_options.ReceivedCollection);

await publishedCollection.BulkWriteAsync(new[]
{
new DeleteManyModel<CapPublishedMessage>(
Builders<CapPublishedMessage>.Filter.Lt(x => x.ExpiresAt, DateTime.Now))
new DeleteManyModel<PublishedMessage>(
Builders<PublishedMessage>.Filter.Lt(x => x.ExpiresAt, DateTime.Now))
});
await receivedCollection.BulkWriteAsync(new[]
{
new DeleteManyModel<CapReceivedMessage>(
Builders<CapReceivedMessage>.Filter.Lt(x => x.ExpiresAt, DateTime.Now))
new DeleteManyModel<ReceivedMessage>(
Builders<ReceivedMessage>.Filter.Lt(x => x.ExpiresAt, DateTime.Now))
});

await context.WaitAsync(_waitingInterval);


+ 4
- 4
src/DotNetCore.CAP.MongoDB/IStorageTransaction.MongoDB.cs 파일 보기

@@ -39,9 +39,9 @@ namespace DotNetCore.CAP.MongoDB
throw new ArgumentNullException(nameof(message));
}

var collection = _database.GetCollection<CapPublishedMessage>(_options.PublishedCollection);
var collection = _database.GetCollection<PublishedMessage>(_options.PublishedCollection);

var updateDef = Builders<CapPublishedMessage>.Update
var updateDef = Builders<PublishedMessage>.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<CapReceivedMessage>(_options.ReceivedCollection);
var collection = _database.GetCollection<ReceivedMessage>(_options.ReceivedCollection);

var updateDef = Builders<CapReceivedMessage>.Update
var updateDef = Builders<ReceivedMessage>.Update
.Set(x => x.Retries, message.Retries)
.Set(x => x.Content, message.Content)
.Set(x => x.ExpiresAt, message.ExpiresAt)


불러오는 중...
취소
저장