redis uses unix socket
This commit is contained in:
parent
c375f7a71d
commit
59b4f9f3da
|
@ -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",
|
||||
|
|
|
@ -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."""
|
||||
|
|
Loading…
Reference in New Issue
Block a user