Skip to content

Commit

Permalink
RefetchControl: upgrade database messages to logger.info
Browse files Browse the repository at this point in the history
  • Loading branch information
pmyteh committed Aug 8, 2018
1 parent 74c17ca commit 2b7b1aa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions RISJbot/spmiddlewares/refetchcontrol.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def spider_opened(self, spider):

new = False
if not os.path.isfile(dbpath):
logger.debug("Can't find database file {}. Regenerating.".format(
logger.info("Can't find database file {}. Regenerating.".format(
dbpath))
# Will need regenerating
new = True
Expand All @@ -107,7 +107,7 @@ def spider_opened(self, spider):
self.dbs[spider.name].isolation_level = None

if new or self.reset or getattr(spider, 'refetchcontrol_reset', False):
logger.debug("Resetting RefetchControl database.")
logger.info("Resetting RefetchControl database.")
c = self.dbs[spider.name].cursor()
c.execute("DROP TABLE IF EXISTS records")
c.execute("DROP INDEX IF EXISTS idx_fetches_time")
Expand Down
4 changes: 2 additions & 2 deletions RISJbot/spmiddlewares/unwantedcontent.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ def process_spider_input(self, response, spider):
try:
sel = response.selector
except AttributeError:
logger.warning("No selector for {}; probably non-HTML".format(
response))
# logger.warning("No selector for {}; probably non-HTML".format(
# response))
return None

if not response.meta.get('sitemap'):
Expand Down
1 change: 1 addition & 0 deletions project.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ RISJbot/spiders/newscsvfeedspider.py
RISJbot/spiders/newsrssfeedspider.py
RISJbot/spiders/newssitemapspider.py
RISJbot/spiders/newssplashcrawlspider.py
RISJbot/spiders/risjicij.py
RISJbot/spiders/risjtt2017.py
RISJbot/spiders/base/__init__.py
RISJbot/spiders/base/businessinsiderspider.py
Expand Down

0 comments on commit 2b7b1aa

Please sign in to comment.