2012-02-15 16:01:24 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# vi:si:et:sw=4:sts=4:ts=4
|
|
|
|
from celery.task import task
|
|
|
|
|
|
|
|
import models
|
|
|
|
|
|
|
|
|
2012-03-21 08:13:38 +00:00
|
|
|
@task(ignore_results=True, queue='default')
|
2012-02-15 16:01:24 +00:00
|
|
|
def update_itemsort(id):
|
|
|
|
p = models.Person.objects.get(pk=id)
|
|
|
|
p.update_itemsort()
|
2012-09-30 16:27:01 +00:00
|
|
|
|
|
|
|
@task(ignore_results=True, queue='default')
|
|
|
|
def update_file_paths(id):
|
|
|
|
from item.models import Item
|
|
|
|
from item.tasks import update_file_paths
|
|
|
|
p = models.Person.objects.get(pk=id)
|
|
|
|
for i in Item.objects.filter(find__value__icontains=p.name).distinct():
|
2014-09-19 12:26:46 +00:00
|
|
|
update_file_paths(i.public_id)
|