background has less documentation than I wanted

This commit is contained in:
tcely 2025-02-02 13:00:30 -05:00 committed by GitHub
parent 9e46b9f6d5
commit deeb2f61a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -337,6 +337,7 @@ def download_media_metadata(media_id):
str(media.pk),
priority=15,
queue=str(media.pk),
repeat=Task.HOURLY,
)
log.exception(e)
log.debug(str(e))
@ -567,7 +568,7 @@ def rename_all_media_for_source(source_id):
for media in Media.objects.filter(source=source):
media.rename_files()
@background(repeat=3600, schedule=0)
@background(schedule=0)
def wait_for_media_premiere(media_id):
td = lambda p, now=timezone.now(): (p - now)
hours = lambda td: 1+int((24*td.days)+(td.seconds/(60*60)))