diff --git a/src/scrapy_redis/scheduler.py b/src/scrapy_redis/scheduler.py index 23d94f8a..ba50a101 100644 --- a/src/scrapy_redis/scheduler.py +++ b/src/scrapy_redis/scheduler.py @@ -37,6 +37,7 @@ def __init__( flush_on_start=False, queue_key=defaults.SCHEDULER_QUEUE_KEY, queue_cls=defaults.SCHEDULER_QUEUE_CLASS, + dupefilter=None, dupefilter_key=defaults.SCHEDULER_DUPEFILTER_KEY, dupefilter_cls=defaults.SCHEDULER_DUPEFILTER_CLASS, idle_before_close=0, @@ -56,6 +57,8 @@ def __init__( Requests queue key. queue_cls : str Importable path to the queue class. + dupefilter: Dupefilter + Custom dupefilter instance. dupefilter_key : str Duplicates filter key. dupefilter_cls : str @@ -106,9 +109,9 @@ def from_settings(cls, settings): if val: kwargs[name] = val - dupefilter_cls = load_object(kwargs['dupefilter_cls']) - if not hasattr(dupefilter_cls, 'from_spider'): - kwargs['dupefilter'] = dupefilter_cls.from_settings(settings) + dupefilter_cls = load_object(kwargs["dupefilter_cls"]) + if not hasattr(dupefilter_cls, "from_spider"): + kwargs["dupefilter"] = dupefilter_cls.from_settings(settings) # Support serializer as a path to a module. if isinstance(kwargs.get("serializer"), str):