本文整理汇总了Python中apps.reader.models.UserSubscription.trim_user_read_stories方法的典型用法代码示例。如果您正苦于以下问题:Python UserSubscription.trim_user_read_stories方法的具体用法?Python UserSubscription.trim_user_read_stories怎么用?Python UserSubscription.trim_user_read_stories使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类apps.reader.models.UserSubscription
的用法示例。
在下文中一共展示了UserSubscription.trim_user_read_stories方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: run
# 需要导入模块: from apps.reader.models import UserSubscription [as 别名]
# 或者: from apps.reader.models.UserSubscription import trim_user_read_stories [as 别名]
def run(self, user_id):
UserSubscription.trim_user_read_stories(user_id)
UserSubscription.verify_feeds_scheduled(user_id)
if random.random() < 0.01:
ss = MSocialServices.objects.get(user_id=user_id)
ss.sync_twitter_photo()
示例2: run
# 需要导入模块: from apps.reader.models import UserSubscription [as 别名]
# 或者: from apps.reader.models.UserSubscription import trim_user_read_stories [as 别名]
def run(self, user_id):
UserSubscription.trim_user_read_stories(user_id)
UserSubscription.verify_feeds_scheduled(user_id)
try:
ss = MSocialServices.objects.get(user_id=user_id)
except MSocialServices.DoesNotExist:
logging.debug(" ---> ~FRCleaning up user, can't find social_services for user_id: ~SB%s" % user_id)
return
ss.sync_twitter_photo()
示例3: run
# 需要导入模块: from apps.reader.models import UserSubscription [as 别名]
# 或者: from apps.reader.models.UserSubscription import trim_user_read_stories [as 别名]
def run(self, user_id):
UserSubscription.trim_user_read_stories(user_id)
UserSubscription.verify_feeds_scheduled(user_id)
Profile.count_all_feed_subscribers_for_user(user_id)
MInteraction.trim(user_id)
MActivity.trim(user_id)
# UserSubscription.refresh_stale_feeds(user_id)
try:
ss = MSocialServices.objects.get(user_id=user_id)
except MSocialServices.DoesNotExist:
logging.debug(" ---> ~FRCleaning up user, can't find social_services for user_id: ~SB%s" % user_id)
return
ss.sync_twitter_photo()
示例4: run
# 需要导入模块: from apps.reader.models import UserSubscription [as 别名]
# 或者: from apps.reader.models.UserSubscription import trim_user_read_stories [as 别名]
def run(self, user_id):
UserSubscription.trim_user_read_stories(user_id)