ソースを参照

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)


読み込み中…
キャンセル
保存