Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit e933a43

Browse files
author
Dushyant Bhalgami
committed
updates for storing final score along with the provisional
1 parent db9e9b7 commit e933a43

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/app.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,19 @@ const dataHandler = (messageSet, topic, partition) => Promise.each(messageSet, a
4141
return
4242
}
4343

44-
if (messageJSON.payload.resource !== 'review') {
44+
if (messageJSON.payload.resource !== 'review' || messageJSON.payload.resource !== 'reviewSummation') {
4545
logger.debug(`Ignoring Non review payloads from topic ${messageJSON.topic}.`)
4646
// ignore the message
4747
return
4848
}
4949

50-
const avScanTypeId = await helper.getreviewTypeId(config.AV_SCAN_NAME)
50+
if (messageJSON.payload.resource === 'review') {
51+
const avScanTypeId = await helper.getreviewTypeId(config.AV_SCAN_NAME)
5152

52-
if (messageJSON.payload.typeId === avScanTypeId) {
53-
logger.debug(`Ignoring AV Scan reviews from topic ${messageJSON.topic}`)
54-
return false
53+
if (messageJSON.payload.typeId === avScanTypeId) {
54+
logger.debug(`Ignoring AV Scan reviews from topic ${messageJSON.topic}`)
55+
return false
56+
}
5557
}
5658

5759
return (async () => {

0 commit comments

Comments
 (0)