TP-5555 | clean up job

This commit is contained in:
varnit goyal
2024-12-10 14:57:21 +05:30
parent d27c023186
commit 8366c352f7
7 changed files with 70 additions and 38 deletions

View File

@@ -49,6 +49,7 @@ func (el *ElasticSearchClient) DeleteDocuments(searchRequest string) {
_, err := el.client.DeleteByQuery(el.Config.Index).Raw(strings.NewReader(searchRequest)).Do(context.TODO())
if err != nil {
log.Printf("unable to delete documents: %s", err.Error())
return
}
log.Printf("successfully deleted documents: %s", searchRequest)
}