Counting feed subscribers needs less logging.

This commit is contained in:
Samuel Clay 2015-07-29 11:57:11 -07:00
parent 9b89a07fe1
commit a259e5b7cb
2 changed files with 4 additions and 2 deletions

View file

@ -394,12 +394,13 @@ class Profile(models.Model):
return True
@classmethod
def count_feed_subscribers(self, feed_id=None, user_id=None):
def count_feed_subscribers(self, feed_id=None, user_id=None, verbose=False):
SUBSCRIBER_EXPIRE = datetime.datetime.now() - datetime.timedelta(days=settings.SUBSCRIBER_EXPIRE)
r = redis.Redis(connection_pool=settings.REDIS_FEED_SUB_POOL)
entire_feed_counted = False
logging.debug(" ---> ~SN~FBCounting subscribers for feed:~SB~FM%s~SN~FB user:~SB~FM%s" % (feed_id, user_id))
if verbose:
logging.debug(" ---> ~SN~FBCounting subscribers for feed:~SB~FM%s~SN~FB user:~SB~FM%s" % (feed_id, user_id))
if feed_id:
feed_ids = [feed_id]

1
fabfile.py vendored
View file

@ -445,6 +445,7 @@ def setup_python():
with settings(warn_only=True):
sudo('chown -R ubuntu.ubuntu /home/ubuntu/.python-eggs')
@parallel
def pip():
pull()
with cd(env.NEWSBLUR_PATH):