mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-04 23:39:18 +00:00
handle reindex item delete during task run
This commit is contained in:
@@ -292,6 +292,9 @@ class Reindex(ReindexBase):
|
||||
|
||||
# read current state
|
||||
video.get_from_es()
|
||||
if not video.json_data():
|
||||
return
|
||||
|
||||
es_meta = video.json_data.copy()
|
||||
|
||||
# get new
|
||||
@@ -329,6 +332,9 @@ class Reindex(ReindexBase):
|
||||
# read current state
|
||||
channel = YoutubeChannel(channel_id)
|
||||
channel.get_from_es()
|
||||
if not channel.json_data:
|
||||
return
|
||||
|
||||
es_meta = channel.json_data.copy()
|
||||
|
||||
# get new
|
||||
@@ -357,6 +363,9 @@ class Reindex(ReindexBase):
|
||||
self._get_all_videos()
|
||||
playlist = YoutubePlaylist(playlist_id)
|
||||
playlist.get_from_es()
|
||||
if not playlist.json_data:
|
||||
return
|
||||
|
||||
subscribed = playlist.json_data["playlist_subscribed"]
|
||||
playlist.all_youtube_ids = self.all_indexed_ids
|
||||
playlist.build_json(scrape=True)
|
||||
|
||||
Reference in New Issue
Block a user