forgot management task

This commit is contained in:
bakatrouble 2019-11-25 22:42:20 +03:00
parent ec8f60876a
commit 7d623f353d

View File

@ -0,0 +1,20 @@
import traceback
from time import sleep
import sentry_sdk
from django.core.management import BaseCommand
from feeds.tasks import check_feeds
class Command(BaseCommand):
def handle(self, *args, **options):
while True:
try:
check_feeds.apply_async()
except KeyboardInterrupt:
return
except Exception as e:
sentry_sdk.capture_exception(e)
traceback.print_exc()
sleep(10*60)