def _dq(self):
        """ Create a new priority queue instance, with disk storage """
        state = self._read_dqs_state(self.dqdir)
        q = create_instance(self.pqclass,
                            None,
                            self.crawler,
                            self._newdq,
                            state,
                            serialize=True)
        if q:
            logger.info("Resuming crawl (%(queuesize)d requests scheduled)",
                        {'queuesize': len(q)}, extra={'spider': self.spider})
        return q
 Create a new priority queue instance, with disk storage 
stackoverflow/venv/lib/python3.6/site-packages/scrapy/core/scheduler.py