forked from 0x2620/pandora
update channels daily
This commit is contained in:
parent
8ac1db8442
commit
92940398a6
1 changed files with 14 additions and 0 deletions
14
pandora/tv/tasks.py
Normal file
14
pandora/tv/tasks.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vi:si:et:sw=4:sts=4:ts=4
|
||||
from datetime import timedelta, datetime
|
||||
|
||||
from celery.task import task
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
import models
|
||||
|
||||
@periodic_task(run_every=timedelta(days=1), queue='encoding')
|
||||
def update_program(**kwargs):
|
||||
user = User.objects.all()[0]
|
||||
for c in models.Channel.objects.all():
|
||||
c.json(user)
|
Loading…
Reference in a new issue