async update of annotation matches, fixes deadlock in load_subtitles
This commit is contained in:
parent
3913373c9b
commit
1c580a2df7
4 changed files with 23 additions and 18 deletions
|
|
@ -1632,7 +1632,7 @@ class Item(models.Model):
|
|||
value=value,
|
||||
user=user
|
||||
)
|
||||
annotation.save()
|
||||
annotation.save(async=True)
|
||||
# otherwise add empty 5 seconds annotation every minute
|
||||
if not subtitles_added:
|
||||
start = offset and int(offset / 60) * 60 + 60 or 0
|
||||
|
|
@ -1647,7 +1647,7 @@ class Item(models.Model):
|
|||
value='',
|
||||
user=user
|
||||
)
|
||||
annotation.save()
|
||||
annotation.save(async=True)
|
||||
offset += f.duration
|
||||
# remove left over clips without annotations
|
||||
Clip.objects.filter(item=self, annotations__id=None).delete()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue