def get_spider_queues(config): """Return a dict of Spider Quees keyed by project name""" dbsdir = config.get('dbs_dir', 'dbs') if not os.path.exists(dbsdir): os.makedirs(dbsdir) d = {} for project in get_project_list(config): dbpath = os.path.join(dbsdir, '%s.db' % project) d[project] = SqliteSpiderQueue(dbpath) return d
def _get_queue(self): return SqliteSpiderQueue(':memory:')