clean up prints

This commit is contained in:
simon 2022-03-29 17:03:34 +07:00
parent 80af255f25
commit 0c8fa8f49e
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4

View File

@ -35,15 +35,10 @@ class SearchProcess:
def _process_result(self, result):
"""dedect which type of data to process"""
index = result["_index"]
document_id = result["_id"]
processed = False
if index == "ta_video":
# process single video
print(f"{document_id}: processing video")
processed = self._process_video(result["_source"])
if index == "ta_channel":
# process single channel
print(f"{document_id}: processing channel")
processed = self._process_channel(result["_source"])
return processed