by default do not get external data asyncronously
This commit is contained in:
parent
220c35ff7b
commit
13dc87268a
1 changed files with 5 additions and 2 deletions
|
@ -37,7 +37,7 @@ from person.models import get_name_sort
|
||||||
from app.models import site_config
|
from app.models import site_config
|
||||||
|
|
||||||
|
|
||||||
def get_item(info, user=None):
|
def get_item(info, user=None, async=False):
|
||||||
'''
|
'''
|
||||||
info dict with:
|
info dict with:
|
||||||
imdbId, title, director, episode_title, season, series
|
imdbId, title, director, episode_title, season, series
|
||||||
|
@ -56,7 +56,10 @@ def get_item(info, user=None):
|
||||||
}
|
}
|
||||||
item.user = user
|
item.user = user
|
||||||
item.save()
|
item.save()
|
||||||
|
if async:
|
||||||
tasks.update_external.delay(item.itemId)
|
tasks.update_external.delay(item.itemId)
|
||||||
|
else:
|
||||||
|
item.update_external()
|
||||||
else:
|
else:
|
||||||
q = Item.objects.all()
|
q = Item.objects.all()
|
||||||
for key in ('title', 'director', 'year'):
|
for key in ('title', 'director', 'year'):
|
||||||
|
|
Loading…
Reference in a new issue