Skip to content
Browse files

Adding reasonable status message for update feeds to denote progress

  • Loading branch information...
1 parent a039f0d commit ab43b85039fb7d7c4d1c238f8c028a0d06d41421 @justinabrahms justinabrahms committed
Showing with 3 additions and 2 deletions.
  1. +3 −2 django_website/aggregator/management/commands/
5 django_website/aggregator/management/commands/
@@ -32,9 +32,10 @@ def handle(self, *args, **kwargs):
def update_feeds(self, verbose=False):
- for feed in Feed.objects.filter(is_defunct=False):
+ total = Feed.objects.filter(is_defunct=False).count()
+ for count, feed in enumerate(Feed.objects.filter(is_defunct=False)):
if verbose:
- print feed
+ print "%s (%d/%d)" % (feed, count+1, total)
parsed_feed = feedparser.parse(feed.feed_url)
for entry in parsed_feed.entries:
title = entry.title.encode(parsed_feed.encoding, "xmlcharrefreplace")

0 comments on commit ab43b85

Please sign in to comment.
Something went wrong with that request. Please try again.