force refresh for new videos to avoid racing condition

pull/106/head
simon 3 years ago
parent 3b6e70b4dc
commit fef26a06b2
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4

@ -408,7 +408,7 @@ class YoutubeVideo:
def upload_to_es(self):
"""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)
if not response.ok:
print(response.text)

Loading…
Cancel
Save