redis uses unix socket
This commit is contained in:
parent
c375f7a71d
commit
59b4f9f3da
|
@ -5,6 +5,7 @@ Project configuration file.
|
||||||
|
|
||||||
REDIS_HOST = 'localhost'
|
REDIS_HOST = 'localhost'
|
||||||
REDIS_PORT = 6379
|
REDIS_PORT = 6379
|
||||||
|
REDIS_SOCKET = '/var/run/redis/redis.sock'
|
||||||
|
|
||||||
FEEDS = [
|
FEEDS = [
|
||||||
"http://website1.com/rss",
|
"http://website1.com/rss",
|
||||||
|
|
|
@ -12,10 +12,8 @@ import requests
|
||||||
|
|
||||||
import config
|
import config
|
||||||
|
|
||||||
_r = redis.Redis(
|
#_r = redis.Redis(config.REDIS_HOST, config.REDIS_PORT)
|
||||||
config.REDIS_HOST,
|
_r = redis.Redis(unix_socket_path=config.REDIS_SOCKET)
|
||||||
config.REDIS_PORT,
|
|
||||||
)
|
|
||||||
|
|
||||||
def scrape_feed(feed_url):
|
def scrape_feed(feed_url):
|
||||||
"""Scrapes an RSS feed and extract all relevant data from it."""
|
"""Scrapes an RSS feed and extract all relevant data from it."""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user