mirror of
https://github.com/tubearchivist/tubearchivist-frontend.git
synced 2024-11-04 19:30:13 +00:00
force refresh for new videos to avoid racing condition
This commit is contained in:
parent
3b6e70b4dc
commit
fef26a06b2
@ -408,7 +408,7 @@ class YoutubeVideo:
|
|||||||
|
|
||||||
def upload_to_es(self):
|
def upload_to_es(self):
|
||||||
"""upload channel data to elastic search"""
|
"""upload channel data to elastic search"""
|
||||||
url = f"{self.ES_URL}/ta_video/_doc/{self.youtube_id}"
|
url = f"{self.ES_URL}/ta_video/_doc/{self.youtube_id}/?refresh=true"
|
||||||
response = requests.put(url, json=self.vid_dict, auth=self.ES_AUTH)
|
response = requests.put(url, json=self.vid_dict, auth=self.ES_AUTH)
|
||||||
if not response.ok:
|
if not response.ok:
|
||||||
print(response.text)
|
print(response.text)
|
||||||
|
Loading…
Reference in New Issue
Block a user