use celerybeat
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
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
|
Reference in New Issue
Block a user