You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
413 B

from time import sleep
from django.core.management import BaseCommand
from feeds.models import Feed
class Command(BaseCommand):
def handle(self, *args, **options):
try:
while True:
feeds = Feed.objects.filter(lock=False)
for feed in feeds:
feed.run_check()
sleep(5)
except KeyboardInterrupt:
pass