@@ -140,7 +140,6 @@ export default async function ({sruUrl, amqpUrl, mongoUri, pollWaitTime}) {
140140
141141 // cleanMongo cleans the actual MongoCollection ('prio'), logCollection ('logPrio') retains all items
142142 async function cleanMongo ( correlationId ) {
143- // Note: queryById result is queueItem before it's timeout check - ie. if check sets queueItemState and errors to they are not shown in result!
144143 const result = await mongoOperator . queryById ( { correlationId, checkModTime : true } ) ;
145144 logger . silly ( ` ${ inspect ( result , { colors : true , maxArrayLength : 3 , depth : 1 } ) } }` ) ;
146145
@@ -221,7 +220,6 @@ export default async function ({sruUrl, amqpUrl, mongoUri, pollWaitTime}) {
221220
222221 // Check status and and also if process has timeouted
223222 // Note: there can be timeout result and the create/update to Melinda can still be done, if timeout happens when while job is being imported
224- // Note: queryById result is queueItem before it's timeout check - ie. if check sets queueItemState and errors to they are not shown in result!
225223 const result = await mongoOperator . queryById ( { correlationId, checkModTime : true } ) ;
226224
227225 if ( queueItemState !== result . queueItemState ) { // eslint-disable-line functional/no-conditional-statements
@@ -238,7 +236,6 @@ export default async function ({sruUrl, amqpUrl, mongoUri, pollWaitTime}) {
238236 }
239237
240238 // queueItem state not DONE/ERROR/ABORT - loop back to check status
241- // Note: we loop once more if queueItem was timeoutet by queryById
242239 return check ( correlationId , result . queueItemState , true ) ;
243240 }
244241
0 commit comments