mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-04-13 09:42:01 +00:00
2to3 apps/rss_feeds
This commit is contained in:
parent
6021afaec3
commit
34e017721b
5 changed files with 7 additions and 7 deletions
|
@ -37,12 +37,12 @@ class Command(BaseCommand):
|
|||
usersubs = UserSubscription.objects.filter(user=u, active=True)
|
||||
else:
|
||||
usersubs = UserSubscription.objects.filter(user=u, needs_unread_recalc=True)
|
||||
print(" ---> %s has %s feeds (%s/%s)" % (u.username, usersubs.count(), i+1, user_count))
|
||||
print((" ---> %s has %s feeds (%s/%s)" % (u.username, usersubs.count(), i+1, user_count)))
|
||||
for sub in usersubs:
|
||||
try:
|
||||
sub.calculate_feed_scores(silent=options['silent'])
|
||||
except Exception as e:
|
||||
print(" ***> Exception: %s" % e)
|
||||
print((" ***> Exception: %s" % e))
|
||||
continue
|
||||
|
||||
def daemonize():
|
||||
|
|
|
@ -20,4 +20,4 @@ class Command(BaseCommand):
|
|||
for feed in feeds:
|
||||
feed.count_stories(verbose=options['verbose'])
|
||||
|
||||
print("\nCounted %s feeds" % feeds.count())
|
||||
print(("\nCounted %s feeds" % feeds.count()))
|
|
@ -30,5 +30,5 @@ class Command(BaseCommand):
|
|||
for feed in old_feeds:
|
||||
feed.count_subscribers(verbose=True)
|
||||
if feed.num_subscribers == 0:
|
||||
print(' ---> Deleting: [%s] %s' % (feed.pk, feed))
|
||||
print((' ---> Deleting: [%s] %s' % (feed.pk, feed)))
|
||||
feed.delete()
|
|
@ -4,4 +4,4 @@ import redis
|
|||
from apps.social.models import *
|
||||
|
||||
r = redis.Redis(connection_pool=settings.REDIS_FEED_UPDATE_POOL)
|
||||
print("Redis: %s" % r)
|
||||
print(("Redis: %s" % r))
|
|
@ -183,9 +183,9 @@ class FeedTest(TestCase):
|
|||
old_story_guid = "blog.google:443/topics/inside-google/google-earths-incredible-3d-imagery-explained/"
|
||||
|
||||
management.call_command('loaddata', 'google1.json', verbosity=1, skip_checks=False)
|
||||
print(Feed.objects.all())
|
||||
print((Feed.objects.all()))
|
||||
feed = Feed.objects.get(pk=766)
|
||||
print(" Testing test_load_feeds__google: %s" % feed)
|
||||
print((" Testing test_load_feeds__google: %s" % feed))
|
||||
stories = MStory.objects(story_feed_id=feed.pk)
|
||||
self.assertEqual(stories.count(), 0)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue