Remove background_task from reset-tasks.py
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
from django.core.management.base import BaseCommand, CommandError # noqa
|
||||
from django.db.transaction import atomic
|
||||
from django.utils.translation import gettext_lazy as _ # noqa
|
||||
from background_task.models import Task
|
||||
from django_huey import DJANGO_HUEY
|
||||
from common.huey import h_q_reset_tasks
|
||||
from common.logger import log
|
||||
@@ -18,8 +17,6 @@ class Command(BaseCommand):
|
||||
for queue_name in (DJANGO_HUEY or {}).get('queues', {}):
|
||||
h_q_reset_tasks(queue_name)
|
||||
with atomic(durable=True):
|
||||
# Delete all tasks
|
||||
Task.objects.all().delete()
|
||||
# Iter all sources, creating new tasks
|
||||
for source in Source.objects.all():
|
||||
log.info(f'Resetting tasks for source: {source}')
|
||||
|
||||
Reference in New Issue
Block a user