def handle(self, **options):
self._initialize(**options)
if (options['rebuild'] and
not options['dry_run'] and
self.es.indices.exists(self.INDEX_NAME)):
self.es.indices.delete(index=self.INDEX_NAME)
if (not options['dry_run'] and
not self.es.indices.exists(self.INDEX_NAME)):
self.es.indices.create(index=self.INDEX_NAME)
if self.is_local_tm:
self._set_latest_indexed_revision(**options)
helpers.bulk(self.es, self._parse_translations(**options))
评论列表
文章目录