Skip to content

Commit

Permalink
refactor(#33): removed unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
JanssenBrm committed Jan 26, 2024
1 parent c3ca283 commit 9963945
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions src/jobs/services/database/database.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,29 +203,4 @@ export class DatabaseService {
},
},
});

/**
* Check if the bulk response of the ES contains an error for one of the items
* @param body - ES response body
* @private
*/
private hasBulkErrors(body: Record<string, any>) {
return this.getBulkErrors(body).length > 0;
}

/**
* Extract the errors from the ES response body
* @param body - ES response body
* @private
*/
private getBulkErrors(
body: Record<string, any>,
): { idx: number; error: any }[] {
return (body.items || [])
.map((i, idx) => ({
idx,
error: i.index?.error?.reason,
}))
.filter((i) => !!i.error);
}
}

0 comments on commit 9963945

Please sign in to comment.