mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-23 21:46:44 +00:00
Merge pull request #832 from tcely/patch-12
Some checks are pending
Run Django tests for TubeSync / test (3.10) (push) Waiting to run
Run Django tests for TubeSync / test (3.11) (push) Waiting to run
Run Django tests for TubeSync / test (3.12) (push) Waiting to run
Run Django tests for TubeSync / test (3.8) (push) Waiting to run
Run Django tests for TubeSync / test (3.9) (push) Waiting to run
Run Django tests for TubeSync / containerise (push) Waiting to run
Some checks are pending
Run Django tests for TubeSync / test (3.10) (push) Waiting to run
Run Django tests for TubeSync / test (3.11) (push) Waiting to run
Run Django tests for TubeSync / test (3.12) (push) Waiting to run
Run Django tests for TubeSync / test (3.8) (push) Waiting to run
Run Django tests for TubeSync / test (3.9) (push) Waiting to run
Run Django tests for TubeSync / containerise (push) Waiting to run
Reorder checking all media to after indexing
This commit is contained in:
commit
18dca06321
@ -129,7 +129,7 @@ def source_post_save(sender, instance, created, **kwargs):
|
||||
verbose_name = _('Checking all media for source "{}"')
|
||||
save_all_media_for_source(
|
||||
str(instance.pk),
|
||||
priority=9,
|
||||
priority=25,
|
||||
verbose_name=verbose_name.format(instance.name),
|
||||
remove_existing_tasks=True
|
||||
)
|
||||
@ -211,7 +211,7 @@ def media_post_save(sender, instance, created, **kwargs):
|
||||
rename_media(
|
||||
str(media.pk),
|
||||
queue=str(media.pk),
|
||||
priority=16,
|
||||
priority=20,
|
||||
verbose_name=verbose_name.format(media.key, media.name),
|
||||
remove_existing_tasks=True
|
||||
)
|
||||
|
@ -234,6 +234,13 @@ def index_source_task(source_id):
|
||||
)
|
||||
if new_media_instance:
|
||||
log.info(f'Indexed new media: {source} / {media}')
|
||||
log.info(f'Scheduling task to download metadata for: {media.url}')
|
||||
verbose_name = _('Downloading metadata for "{}"')
|
||||
download_media_metadata(
|
||||
str(media.pk),
|
||||
priority=9,
|
||||
verbose_name=verbose_name.format(media.pk),
|
||||
)
|
||||
except IntegrityError as e:
|
||||
log.error(f'Index media failed: {source} / {media} with "{e}"')
|
||||
# Tack on a cleanup of old completed tasks
|
||||
|
Loading…
Reference in New Issue
Block a user