@@ -140,7 +140,6 @@ export default async function ({sruUrl, amqpUrl, mongoUri, pollWaitTime}) {
140
140
141
141
// cleanMongo cleans the actual MongoCollection ('prio'), logCollection ('logPrio') retains all items
142
142
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!
144
143
const result = await mongoOperator . queryById ( { correlationId, checkModTime : true } ) ;
145
144
logger . silly ( ` ${ inspect ( result , { colors : true , maxArrayLength : 3 , depth : 1 } ) } }` ) ;
146
145
@@ -221,7 +220,6 @@ export default async function ({sruUrl, amqpUrl, mongoUri, pollWaitTime}) {
221
220
222
221
// Check status and and also if process has timeouted
223
222
// 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!
225
223
const result = await mongoOperator . queryById ( { correlationId, checkModTime : true } ) ;
226
224
227
225
if ( queueItemState !== result . queueItemState ) { // eslint-disable-line functional/no-conditional-statements
@@ -238,7 +236,6 @@ export default async function ({sruUrl, amqpUrl, mongoUri, pollWaitTime}) {
238
236
}
239
237
240
238
// queueItem state not DONE/ERROR/ABORT - loop back to check status
241
- // Note: we loop once more if queueItem was timeoutet by queryById
242
239
return check ( correlationId , result . queueItemState , true ) ;
243
240
}
244
241
0 commit comments