mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-22 04:56:35 +00:00
Don't create a repeating indexing task in the CLI
This commit is contained in:
parent
276eca0d28
commit
beff72bf48
@ -4,7 +4,7 @@ from django.utils.translation import gettext_lazy as _
|
|||||||
from background_task.models import Task
|
from background_task.models import Task
|
||||||
from common.logger import log
|
from common.logger import log
|
||||||
from sync.models import Source
|
from sync.models import Source
|
||||||
from sync.tasks import index_source_task, check_source_directory_exists
|
from sync.tasks import check_source_directory_exists
|
||||||
|
|
||||||
|
|
||||||
class Command(BaseCommand):
|
class Command(BaseCommand):
|
||||||
@ -23,15 +23,6 @@ class Command(BaseCommand):
|
|||||||
str(source.pk),
|
str(source.pk),
|
||||||
verbose_name=verbose_name.format(source.name),
|
verbose_name=verbose_name.format(source.name),
|
||||||
)
|
)
|
||||||
# Recreate the initial indexing task
|
|
||||||
log.info(f'Resetting tasks for source: {source}')
|
|
||||||
verbose_name = _('Index media from source "{}"')
|
|
||||||
index_source_task(
|
|
||||||
str(source.pk),
|
|
||||||
repeat=source.index_schedule,
|
|
||||||
schedule=source.task_run_at_dt,
|
|
||||||
verbose_name=verbose_name.format(source.name),
|
|
||||||
)
|
|
||||||
# This also chains down to call each Media objects .save() as well
|
# This also chains down to call each Media objects .save() as well
|
||||||
source.save()
|
source.save()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user