Traces图表显示/images.GetUrlBase
调用我的搜索功能。我尝试将其get_serving_url ()
并行调用,但Traces图表仍将调用显示为顺序
如何使其平行?
我的尝试
class Gets
@staticmethod
@ndb.tasklet
def get_img_url_parallel ( image_key ):
url = yield images.get_serving_url_async (image_key)
raise ndb.Return ( url )
@toplevel
def search (..):
::
for record in record_list:
::
for photo in record.photo_list:
if (photo != ""):
yielded_photo = yield Gets.get_img_url_parallel ( photo )
photo_list.append ( yielded_photo )
::
我是新手,但是,tasklet。