Switching redis feed sub pool to sessions redis server.

This commit is contained in:
Samuel Clay 2015-08-11 13:33:49 -07:00
parent 013a4db201
commit 2d7e539f9a
2 changed files with 3 additions and 1 deletions

View file

@ -480,7 +480,9 @@ class Profile(models.Model):
if entire_feed_counted:
now = int(datetime.datetime.now().strftime('%s'))
r.zadd(key, -1, now)
r.expire(key, settings.SUBSCRIBER_EXPIRE*24*60*60)
r.zadd(premium_key, -1, now)
r.expire(premium_key, settings.SUBSCRIBER_EXPIRE*24*60*60)
logging.info(" ---> [%-30s] ~SN~FBCounting subscribers, storing in ~SBredis~SN: ~FMt:~SB~FM%s~SN a:~SB%s~SN p:~SB%s~SN ap:~SB%s" %
(feed.title[:30], total, active, premium, active_premium))

View file

@ -658,7 +658,7 @@ REDIS_STORY_HASH_TEMP_POOL = redis.ConnectionPool(host=REDIS['host'], port=6379,
# REDIS_CACHE_POOL = redis.ConnectionPool(host=REDIS['host'], port=6379, db=6) # Duped in CACHES
REDIS_SESSION_POOL = redis.ConnectionPool(host=SESSION_REDIS_HOST, port=6379, db=5)
REDIS_STORY_HASH_POOL = redis.ConnectionPool(host=REDIS_STORY['host'], port=6379, db=1)
REDIS_FEED_SUB_POOL = redis.ConnectionPool(host=REDIS_STORY['host'], port=6379, db=2)
REDIS_FEED_SUB_POOL = redis.ConnectionPool(host=SESSION_REDIS_HOST, port=6379, db=2)
REDIS_PUBSUB_POOL = redis.ConnectionPool(host=REDIS_PUBSUB['host'], port=6379, db=0)
# ==========