forgot management task
This commit is contained in:
parent
ec8f60876a
commit
7d623f353d
20
feeds/management/commands/periodic_feeds.py
Normal file
20
feeds/management/commands/periodic_feeds.py
Normal 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)
|
Loading…
Reference in New Issue
Block a user