mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-04-13 09:42:01 +00:00
20 lines
No EOL
605 B
Python
20 lines
No EOL
605 B
Python
from django.core.management.base import BaseCommand
|
|
from django.core.handlers.wsgi import WSGIHandler
|
|
from apps.rss_feeds.models import Feed, Story
|
|
from django.core.cache import cache
|
|
from apps.rss_feeds.models import Feed
|
|
from optparse import OptionParser, make_option
|
|
import os
|
|
import errno
|
|
|
|
class Command(BaseCommand):
|
|
option_list = BaseCommand.option_list + (
|
|
make_option("-f", "--feed", dest="feed", default=None),
|
|
)
|
|
|
|
def handle(self, *args, **options):
|
|
|
|
feeds = Feed.objects.filter(fetched_once=True)
|
|
for f in feeds:
|
|
f.trim_feed()
|
|
|