Files
mayan-edms/mayan/apps/common/management/commands/purgeperiodictasks.py
Roberto Rosario cb7d5bf82a Update djcelery imports
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-07-20 00:15:19 -04:00

14 lines
361 B
Python

from __future__ import unicode_literals
from django.core import management
from django_celery_beat.models import IntervalSchedule, PeriodicTask
class Command(management.BaseCommand):
help = 'Removes all periodic tasks.'
def handle(self, *args, **options):
PeriodicTask.objects.all().delete()
IntervalSchedule.objects.all().delete()