File tree Expand file tree Collapse file tree
services/apps/data_sink_worker/src/service Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -247,9 +247,21 @@ export default class DataSinkService extends LoggerBase {
247247 }
248248
249249 public async processResults (
250- batch : { resultId : string ; data : IResultData | undefined ; created : boolean } [ ] ,
250+ resultsToProcess : { resultId : string ; data : IResultData | undefined ; created : boolean } [ ] ,
251251 postProcess = true ,
252252 ) : Promise < void > {
253+ const batch : { resultId : string ; data : IResultData | undefined ; created : boolean } [ ] = [ ]
254+ for ( const result of resultsToProcess ) {
255+ const filtered = resultsToProcess . filter ( ( r ) => r . resultId === result . resultId )
256+ if ( filtered . length > 1 ) {
257+ this . log . warn (
258+ { resultId : result . resultId } ,
259+ 'Found multiple results for the same result id!' ,
260+ )
261+ }
262+ batch . push ( filtered [ 0 ] )
263+ }
264+
253265 this . log . trace ( `[RESULTS] Processing ${ batch . length } results!` )
254266 const start = performance . now ( )
255267
You can’t perform that action at this time.
0 commit comments