From e17ac87475c029bf7ba4f8fcc1662ed5fda41be2 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 20 Aug 2011 11:04:19 +0200 Subject: [PATCH] by default do not get external data asyncronously --- pandora/item/models.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pandora/item/models.py b/pandora/item/models.py index 73dfba2be..2374d7f42 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -37,7 +37,7 @@ from person.models import get_name_sort from app.models import site_config -def get_item(info, user=None): +def get_item(info, user=None, async=False): ''' info dict with: imdbId, title, director, episode_title, season, series @@ -56,7 +56,10 @@ def get_item(info, user=None): } item.user = user item.save() - tasks.update_external.delay(item.itemId) + if async: + tasks.update_external.delay(item.itemId) + else: + item.update_external() else: q = Item.objects.all() for key in ('title', 'director', 'year'):