assign subtitles ot subtitles user
This commit is contained in:
parent
0629c5de6b
commit
04abbcf2b9
1 changed files with 9 additions and 0 deletions
9
tasks.py
Normal file
9
tasks.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from celery.task import periodic_task
|
||||
|
||||
@periodic_task(run_every=timedelta(hours=1), queue='encoding')
|
||||
def subtitles_user(**kwargs):
|
||||
import annotation.models
|
||||
from user.models import User
|
||||
u = User.object.get(username='subtitles')
|
||||
annotation.models.Annotation.objects.filter(layer='subtitles').exclude(user=u).update(user=u)
|
Loading…
Reference in a new issue