Skip to content

Commit

Permalink
Update settings to read AWS keys from environment
Browse files Browse the repository at this point in the history
  • Loading branch information
prncc committed Apr 17, 2017
1 parent f87ec18 commit 51845c1
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions steam/steam/settings.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
# -*- coding: utf-8 -*-

# Scrapy settings for steam project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# http://doc.scrapy.org/en/latest/topics/settings.html
# http://scrapy.readthedocs.org/en/latest/topics/downloader-middleware.html
# http://scrapy.readthedocs.org/en/latest/topics/spider-middleware.html
from smart_getenv import getenv

BOT_NAME = 'steam'

Expand Down Expand Up @@ -89,4 +80,7 @@
HTTPCACHE_EXPIRATION_SECS = 0 # Never expire.
HTTPCACHE_DIR = 'httpcache'
HTTPCACHE_IGNORE_HTTP_CODES = [301, 302, 303, 306, 307, 308]
HTTPCACHE_STORAGE = 'steam.middlewares.SteamCacheStorage'
HTTPCACHE_STORAGE = 'steam.middlewares.SteamCacheStorage'

AWS_ACCESS_KEY_ID = getenv('AWS_ACCESS_KEY_ID', type=str, default=None)
AWS_SECRET_ACCESS_KEY = getenv('AWS_SECRET_ACCESS_KEY', type=str, default=None)

0 comments on commit 51845c1

Please sign in to comment.