提交 0665175d 编写于 作者: P Pablo Hoffman

removed some obsolete remaining code related to sqlite support in scrapy

上级 68c1c98d
......@@ -35,8 +35,6 @@ structure by default, similar to this::
spider1.py
spider2.py
...
.scrapy/
scrapy.db
The directory where the ``scrapy.cfg`` file resides is known as the *project
root directory*. That file contains the name of the python module that defines
......@@ -45,12 +43,6 @@ the project settings. Here is an example::
[settings]
default = myproject.settings
By default, Scrapy projects use a SQLite_ database to store persistent runtime
data of the project, such as the spider queue (the list of spiders that are
scheduled to run). By default, this SQLite database is stored in the *project
data directory* which, by default, is the ``.scrapy`` directory inside the
project root directory mentioned above.
Using the ``scrapy`` tool
=========================
......@@ -466,5 +458,3 @@ commands for your Scrapy project.
Example::
COMMANDS_MODULE = 'mybot.commands'
.. _SQLite: http://en.wikipedia.org/wiki/SQLite
......@@ -883,18 +883,6 @@ Example::
SPIDER_MODULES = ['mybot.spiders_prod', 'mybot.spiders_dev']
.. setting:: SQLITE_DB
SQLITE_DB
---------
Default: ``'scrapy.db'``
The location of the project SQLite database, used for storing the spider queue
and other persistent data of the project. If a relative path is given, is taken
relative to the project data dir. For more info see:
:ref:`topics-project-structure`.
.. setting:: STATS_CLASS
STATS_CLASS
......
......@@ -246,8 +246,6 @@ SPIDER_MIDDLEWARES_BASE = {
SPIDER_MODULES = []
SQLITE_DB = 'scrapy.db'
STATS_CLASS = 'scrapy.statscol.MemoryStatsCollector'
STATS_ENABLED = True
STATS_DUMP = True
......
......@@ -27,8 +27,6 @@ class Environment(object):
env['SCRAPY_JOB'] = message['_job']
if project in self.settings:
env['SCRAPY_SETTINGS_MODULE'] = self.settings[project]
dbpath = os.path.join(self.dbs_dir, '%s.db' % project)
env['SCRAPY_SQLITE_DB'] = dbpath
env['SCRAPY_LOG_FILE'] = self._get_log_file(message)
return env
......
......@@ -29,6 +29,5 @@ class EnvironmentTest(unittest.TestCase):
self.assertEqual(env['SCRAPY_SLOT'], '3')
self.assertEqual(env['SCRAPY_SPIDER'], 'myspider')
self.assertEqual(env['SCRAPY_JOB'], 'ID')
self.assert_(env['SCRAPY_SQLITE_DB'].endswith('mybot.db'))
self.assert_(env['SCRAPY_LOG_FILE'].endswith(os.path.join('mybot', 'myspider', 'ID.log')))
self.failIf('SCRAPY_SETTINGS_MODULE' in env)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册