Update tasks.py

This commit is contained in:
tcely authored and GitHub committed 2025-05-26 01:11:09 -04:00
1 parent 17483c4368
commit 310f7faf75
1 file changed
+5
+5
View File
@@ -319,6 +319,8 @@ def index_source_task(source_id):
# An inactive Source would return an empty list for videos anyway
if not source.is_active:
return
# update the target schedule column
source.task_run_at_dt
# Reset any errors
# TODO: determine if this affects anything
source.has_failed = False
@@ -407,6 +409,9 @@ def index_source_task(source_id):
str(media.pk),
verbose_name=verbose_name.format(media.key, media.name),
)
# start run_at with the next schedule target
if task:
task.run_at = source.task_run_at_dt
# Reset task.verbose_name to the saved value
update_task_status(task, None)
# Cleanup of media no longer available from the source