mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Killing spammers when sharing popular stories.
This commit is contained in:
parent
4caee4fb7b
commit
b536ce85a6
1 changed files with 6 additions and 0 deletions
|
@ -66,6 +66,12 @@ class SharePopularStories(Task):
|
|||
name = 'share-popular-stories'
|
||||
|
||||
def run(self, **kwargs):
|
||||
logging.debug(" ---> Finding spammers...")
|
||||
_, spammer_user_ids = MSharedStory.count_potential_spammers()
|
||||
logging.debug(" ---> Found %s spammers, deleting...")
|
||||
for user_id in spammer_user_ids:
|
||||
user = User.objects.get(pk=user_id)
|
||||
user.profile.delete_user(confirm=True, fast=True)
|
||||
logging.debug(" ---> Sharing popular stories...")
|
||||
MSharedStory.share_popular_stories(interactive=False)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue