From 44ff1937338054db2aae47413bed9b4b98d10d2c Mon Sep 17 00:00:00 2001 From: Pedro Pombeiro Date: Tue, 6 Feb 2018 12:01:08 +0100 Subject: [PATCH] Add logging for script loading --- index.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 8f6fac1..d094208 100644 --- a/index.js +++ b/index.js @@ -1,11 +1,11 @@ -var MemCache = require('mem-cache') -var SlackGitHubCacheBuilder = require('./lib/retrieve-slack-github-users') +let MemCache = require('mem-cache') +let SlackGitHubCacheBuilder = require('./lib/retrieve-slack-github-users') module.exports = async (robot) => { console.log('Yay, the app was loaded!') - var slackGitHubCache = new MemCache({ timeoutDisabled: true }) - var slackCachePromise = SlackGitHubCacheBuilder.build(robot, slackGitHubCache) + let slackGitHubCache = new MemCache({ timeoutDisabled: true }) + let slackCachePromise = SlackGitHubCacheBuilder.build(robot, slackGitHubCache) require('./bot_scripts/assign-new-pr-to-review')(robot) require('./bot_scripts/assign-approved-pr-to-test')(robot) @@ -13,6 +13,7 @@ module.exports = async (robot) => { require('./bot_scripts/greet-new-contributor')(robot) await slackCachePromise + robot.log.info('Slack username cache populated, loading remainder of scripts') // Add scripts which require using the Slack/GitHub cache after this comment