From 7864ca1f70371a3d6baff9a4eb7c23e52eb3a6c3 Mon Sep 17 00:00:00 2001 From: j Date: Sun, 14 Jul 2019 19:23:06 +0100 Subject: [PATCH] avoid async, fails in python3.7 --- pandora/item/models.py | 4 ++-- pandora/item/tasks.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pandora/item/models.py b/pandora/item/models.py index 6bb4f50a..5dae6d91 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -1361,7 +1361,7 @@ class Item(models.Model): qs = qs.order_by('file__part', 'file__sort_path') return qs - def update_timeline(self, async=True): + def update_timeline(self, async_=True): streams = self.streams() self.make_timeline() if streams.count() == 1: @@ -1391,7 +1391,7 @@ class Item(models.Model): self.rendered = streams.count() > 0 self.save() if self.rendered: - if async: + if async_: get_sequences.delay(self.public_id) else: get_sequences(self.public_id) diff --git a/pandora/item/tasks.py b/pandora/item/tasks.py index 0bda0651..a0c9cac5 100644 --- a/pandora/item/tasks.py +++ b/pandora/item/tasks.py @@ -102,7 +102,7 @@ def update_timeline(public_id): item = models.Item.objects.get(public_id=public_id) except models.Item.DoesNotExist: return - item.update_timeline(async=False) + item.update_timeline(async_=False) Task.finish(item) @task(queue="encoding") @@ -111,7 +111,7 @@ def rebuild_timeline(public_id): i = models.Item.objects.get(public_id=public_id) for s in i.streams(): s.make_timeline() - i.update_timeline(async=False) + i.update_timeline(async_=False) @task(queue="encoding") def load_subtitles(public_id):