2019-11-25 19:42:20 +00:00
|
|
|
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()
|
2019-11-25 19:51:03 +00:00
|
|
|
sleep(10*60)
|
2019-11-25 19:42:20 +00:00
|
|
|
except KeyboardInterrupt:
|
|
|
|
return
|
|
|
|
except Exception as e:
|
|
|
|
sentry_sdk.capture_exception(e)
|
|
|
|
traceback.print_exc()
|