From 718413d65bb16b7778a959eef30ec67bc237ef29 Mon Sep 17 00:00:00 2001 From: jfoley Date: Mon, 25 Jan 2021 11:04:08 +0200 Subject: [PATCH] Changed output date formats to Number instead of string. --- typology-11/.env.template | 2 +- typology-11/src/consumer.ts | 4 ++-- typology-11/src/scoring-process.ts | 2 +- typology-214/src/scoring-process.ts | 2 +- typology-27/src/scoring-process.ts | 2 +- typology-28/src/scoring-process.ts | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/typology-11/.env.template b/typology-11/.env.template index eaf25cf4f..e23cce0a5 100644 --- a/typology-11/.env.template +++ b/typology-11/.env.template @@ -4,7 +4,7 @@ RESULT_TOPIC=typology11Result CONSUMER_GROUP=kafka-node-group PARTITION=0 AUTO_COMMIT=false -LOG_TOPIC=typology214log +LOG_TOPIC=typology11log MAX_QUEUE_SIZE=50 MAX_PARALLEL_HANDLES=10 REDIS_AUTH=yourpassword diff --git a/typology-11/src/consumer.ts b/typology-11/src/consumer.ts index 77a2acfc1..ca6a8864d 100644 --- a/typology-11/src/consumer.ts +++ b/typology-11/src/consumer.ts @@ -21,7 +21,7 @@ const createConsumer = (config: ConfigObj) => new kafka.ConsumerGroup( */ const createKafkaConsumer = async (senderClient: RedisClient, receiverClient: RedisClient) => { const { topic } = config; - log('Starting Typology 214 engine...', topic); + log('Starting Typology 11 engine...', topic); try { const consumer = createConsumer(config); let paused = false; @@ -56,7 +56,7 @@ const createKafkaConsumer = async (senderClient: RedisClient, receiverClient: Re paused = true; } }); - log('Started Typology 214 engine.', topic); + log('Started Typology 11 engine.', topic); } catch (e) { log(`Unhandled exception while starting consumer with details: ${e}`, topic); } diff --git a/typology-11/src/scoring-process.ts b/typology-11/src/scoring-process.ts index 5e5eaa1d7..fd2e25041 100644 --- a/typology-11/src/scoring-process.ts +++ b/typology-11/src/scoring-process.ts @@ -23,7 +23,7 @@ const handleScores = (scores: any, topic: string, TransactionID: string, transac + (scores.rule86 ? 0.25 : 0) + (scores.rule87 ? 0.25 : 0); - publish(topic, `"typology":"typology-11","transactionID":"${TransactionID}","score":"${score}","createDate":"${transactionDate}", + publish(topic, `"typology":"typology-11","transactionID":"${TransactionID}","score":"${score}","createDate":${transactionDate}, "textResult":"Typology 11 score is ${score}, Reason: ${ + (scores.rule17 ? 'Transaction Divergence, ' : '') + (scores.rule27 ? 'Transaction Mirroring, ' : '') diff --git a/typology-214/src/scoring-process.ts b/typology-214/src/scoring-process.ts index baf25a084..42b683ebf 100644 --- a/typology-214/src/scoring-process.ts +++ b/typology-214/src/scoring-process.ts @@ -22,7 +22,7 @@ const handleScores = (scores: any, topic: string, TransactionID: string, transac + (scores.rule48 ? 0.2 : 0) + (scores.rule78 ? 0.2 : 0); - publish(topic, `"typology":"typology-214","transactionID":"${TransactionID}","score":"${score}","createDate":"${transactionDate}", + publish(topic, `"typology":"typology-214","transactionID":"${TransactionID}","score":"${score}","createDate":${transactionDate}, "textResult":"Typology 214 score is ${score}, Reason: ${(scores.rule3 ? 'Account Dormancy - Payee, ' : '') + (scores.rule12 ? 'Party Type Individual, ' : '') + (scores.rule27 ? 'Transaction Mirroring, ' : '') diff --git a/typology-27/src/scoring-process.ts b/typology-27/src/scoring-process.ts index 15d3d0790..9a11b422c 100644 --- a/typology-27/src/scoring-process.ts +++ b/typology-27/src/scoring-process.ts @@ -29,7 +29,7 @@ const handleScores = (scores: any, topic: string, TransactionID: string, transac + (scores.rule78 ? 0.2 : 0) ); - publish(topic, `"typology":"typology-27","transactionID":"${TransactionID}","score":${score},"createDate":"${transactionDate}", + publish(topic, `"typology":"typology-27","transactionID":"${TransactionID}","score":${score},"createDate":${transactionDate}, "textResult":"Typology 27 score is ${score}, Reason: ${(scores.rule9 ? 'Recent Sim Swap, ' : '') + (scores.rule12 ? 'Party Type Individual, ' : '') + (scores.rule14 ? 'Recent Password Reset, ' : '') diff --git a/typology-28/src/scoring-process.ts b/typology-28/src/scoring-process.ts index 71cab3d70..26fd41f2c 100644 --- a/typology-28/src/scoring-process.ts +++ b/typology-28/src/scoring-process.ts @@ -30,7 +30,7 @@ const handleScores = (scores: any, topic: string, TransactionID: string, transac + (scores.rule64 ? 0.15 : 0) ; - publish(topic, `"typology":"typology-28","transactionID":"${TransactionID}","createDate":"${transactionDate}", + publish(topic, `"typology":"typology-28","transactionID":"${TransactionID}","createDate":${transactionDate}, "score":${score},"textResult":"Typology 28 score is ${score}, Reason: ${(scores.rule2 ? 'Velocity (incoming), ' : '') + (scores.rule12 ? 'Party Type Individual, ' : '') + (scores.rule16 ? 'Transaction Convergence, ' : '')