def _save_events(db_events, disable_updates=None):
objects_to_put = list(db_events)
objects_to_put += [search.DisplayEvent.build(x) for x in db_events]
# Because some DisplayEvent.build() calls return None (from errors, or from inability)
objects_to_put = [x for x in objects_to_put if x]
ndb.put_multi(objects_to_put)
if 'index' not in (disable_updates or []):
search.update_fulltext_search_index_batch(db_events)
评论列表
文章目录