mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
Implement Max Queue and Max Batch size when publishing
MaxPublishBatchSize must be set, but MaxQueueSize can be set to 0 to disable check of the rabbitmq queue size
This commit is contained in:
@@ -17,7 +17,13 @@ public class PublisherJob(IMessagePublisher publisher, IDataStorage storage, ILo
|
||||
return;
|
||||
}
|
||||
|
||||
await publisher.PublishAsync(torrents, cancellationToken);
|
||||
var published = await publisher.PublishAsync(torrents, cancellationToken);
|
||||
|
||||
if (!published)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var result = await storage.SetTorrentsProcessed(torrents, cancellationToken);
|
||||
|
||||
if (!result.Success)
|
||||
|
||||
Reference in New Issue
Block a user