diff --git a/src/index.ts b/src/index.ts index 40397daf2ba90fcd5be8741fa7bde296326d4398..15b50d023b91c9ffbd1f266899e342fea313cdd1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -23,11 +23,8 @@ async function main() { await redis.connect(); log.info('Connected to Redis!'); - queryServiceReader(frontendPublisher, mlPublisher, 'neo4j'); - insightProcessor(); - // TODO: other query services for other databases - - log.info('Connected to RabbitMQ!'); + await queryServiceReader(frontendPublisher, mlPublisher, 'neo4j'); + await insightProcessor(); } -main(); +await main(); diff --git a/src/readers/insightProcessor.ts b/src/readers/insightProcessor.ts index 50bd7befe13b3715439cc73bb10ee53710800bb9..71014ea1bd75cbed02dab9f764bf143caac55d3a 100644 --- a/src/readers/insightProcessor.ts +++ b/src/readers/insightProcessor.ts @@ -94,7 +94,7 @@ export const insightProcessor = async () => { const cypher = query2Cypher(convertedQuery); if (cypher == null) return; try { - const result = await queryService(ss.dbConnections[0], cypher); + const result = await queryService(ss.dbConnections[0], cypher, true); insight.status = false;