(cls: Type[SchedulerTV], crawler)
return cls(
            dupefilter=create_instance(dupefilter_cls, crawler.settings, crawler),
            jobdir=job_dir(crawler.settings),
            dqclass=load_object(crawler.settings['SCHEDULER_DISK_QUEUE']),
            mqclass=load_object(crawler.settings['SCHEDULER_MEMORY_QUEUE']),
            logunser=crawler.settings.getbool('SCHEDULER_DEBUG'),
            stats=crawler.stats,
            pqclass=load_object(crawler.settings['SCHEDULER_PRIORITY_QUEUE']),
            crawler=crawler,
        )
Factory method, initializes the scheduler with arguments taken from the crawl settings
Factory method, initializes the scheduler with arguments taken from the crawl settings
Factory method initializes the scheduler with arguments taken from the crawl settings
def from_crawler(cls: Type[SchedulerTV], crawler) -> SchedulerTV:
        """
        Factory method, initializes the scheduler with arguments taken from the crawl settings
        """
        dupefilter_cls = load_object(crawler.settings['DUPEFILTER_CLASS'])
        return cls(
            dupefilter=create_instance(dupefilter_cls, crawler.settings, crawler),
            jobdir=job_dir(crawler.settings),
            dqclass=load_object(crawler.settings['SCHEDULER_DISK_QUEUE']),
            mqclass=load_object(crawler.settings['SCHEDULER_MEMORY_QUEUE']),
            logunser=crawler.settings.getbool('SCHEDULER_DEBUG'),
            stats=crawler.stats,
            pqclass=load_object(crawler.settings['SCHEDULER_PRIORITY_QUEUE']),
            crawler=crawler,
        )
def from_crawler ( cls : Type [ SchedulerTV ] , crawler ) -> SchedulerTV : dupefilter_cls = load_object ( crawler . settings [ 'DUPEFILTER_CLASS' ] ) return cls ( dupefilter = create_instance ( dupefilter_cls , crawler . settings , crawler ) , jobdir = job_dir ( crawler . settings ) , dqclass = load_object ( crawler . settings [ 'SCHEDULER_DISK_QUEUE' ] ) , mqclass = load_object ( crawler . settings [ 'SCHEDULER_MEMORY_QUEUE' ] ) , logunser = crawler . settings . getbool ( 'SCHEDULER_DEBUG' ) , stats = crawler . stats , pqclass = load_object ( crawler . settings [ 'SCHEDULER_PRIORITY_QUEUE' ] ) , crawler = crawler , )