mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
Introduce max batch size, and configurable publish window
Still need to implement queue size limit Also fixes env var consistency between addon and consumer
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
namespace Scraper.Models;
|
||||
namespace Producer.Models;
|
||||
|
||||
public class GithubConfiguration
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Scraper.Models;
|
||||
namespace Producer.Models;
|
||||
|
||||
public class RabbitMqConfiguration
|
||||
{
|
||||
@@ -10,4 +10,7 @@ public class RabbitMqConfiguration
|
||||
public string? Password { get; set; }
|
||||
public string? QueueName { get; set; }
|
||||
public bool Durable { get; set; }
|
||||
public int MaxQueueSize { get; set; } = 1000;
|
||||
public int MaxPublishBatchSize { get; set; } = 100;
|
||||
public int PublishIntervalInSeconds { get; set; } = 1000 * 10;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Scraper.Models;
|
||||
namespace Producer.Models;
|
||||
|
||||
public record InsertTorrentResult(bool Success, int InsertedCount = 0, string? ErrorMessage = null);
|
||||
public record UpdatedTorrentResult(bool Success, int UpdatedCount = 0, string? ErrorMessage = null);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Scraper.Models;
|
||||
namespace Producer.Models;
|
||||
|
||||
public class ScrapeConfiguration
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Scraper.Models;
|
||||
namespace Producer.Models;
|
||||
|
||||
public class Scraper
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Scraper.Models;
|
||||
namespace Producer.Models;
|
||||
|
||||
// Torrent represents a crawled torrent from one of our
|
||||
// supported sources.
|
||||
|
||||
Reference in New Issue
Block a user