mirror of
https://github.com/tubearchivist/tubearchivist.git
synced 2024-12-22 18:00:13 +00:00
handle reindex item delete during task run
This commit is contained in:
parent
fe8f4faa10
commit
14e23a4371
@ -292,6 +292,9 @@ class Reindex(ReindexBase):
|
|||||||
|
|
||||||
# read current state
|
# read current state
|
||||||
video.get_from_es()
|
video.get_from_es()
|
||||||
|
if not video.json_data():
|
||||||
|
return
|
||||||
|
|
||||||
es_meta = video.json_data.copy()
|
es_meta = video.json_data.copy()
|
||||||
|
|
||||||
# get new
|
# get new
|
||||||
@ -329,6 +332,9 @@ class Reindex(ReindexBase):
|
|||||||
# read current state
|
# read current state
|
||||||
channel = YoutubeChannel(channel_id)
|
channel = YoutubeChannel(channel_id)
|
||||||
channel.get_from_es()
|
channel.get_from_es()
|
||||||
|
if not channel.json_data:
|
||||||
|
return
|
||||||
|
|
||||||
es_meta = channel.json_data.copy()
|
es_meta = channel.json_data.copy()
|
||||||
|
|
||||||
# get new
|
# get new
|
||||||
@ -357,6 +363,9 @@ class Reindex(ReindexBase):
|
|||||||
self._get_all_videos()
|
self._get_all_videos()
|
||||||
playlist = YoutubePlaylist(playlist_id)
|
playlist = YoutubePlaylist(playlist_id)
|
||||||
playlist.get_from_es()
|
playlist.get_from_es()
|
||||||
|
if not playlist.json_data:
|
||||||
|
return
|
||||||
|
|
||||||
subscribed = playlist.json_data["playlist_subscribed"]
|
subscribed = playlist.json_data["playlist_subscribed"]
|
||||||
playlist.all_youtube_ids = self.all_indexed_ids
|
playlist.all_youtube_ids = self.all_indexed_ids
|
||||||
playlist.build_json(scrape=True)
|
playlist.build_json(scrape=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user