redis uses unix socket

This commit is contained in:
iou1name 2019-10-21 10:31:02 -04:00
parent c375f7a71d
commit 59b4f9f3da
2 changed files with 3 additions and 4 deletions

View File

@ -5,6 +5,7 @@ Project configuration file.
REDIS_HOST = 'localhost'
REDIS_PORT = 6379
REDIS_SOCKET = '/var/run/redis/redis.sock'
FEEDS = [
"http://website1.com/rss",

View File

@ -12,10 +12,8 @@ import requests
import config
_r = redis.Redis(
config.REDIS_HOST,
config.REDIS_PORT,
)
#_r = redis.Redis(config.REDIS_HOST, config.REDIS_PORT)
_r = redis.Redis(unix_socket_path=config.REDIS_SOCKET)
def scrape_feed(feed_url):
"""Scrapes an RSS feed and extract all relevant data from it."""