From 1a50a70fee49bd8e2afe1c1911150e0827034d53 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Tue, 27 Oct 2015 16:20:14 -0700 Subject: [PATCH] sendHeartbeat on activation event --- src/cloudron.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/cloudron.js b/src/cloudron.js index 57a12b25d..7e88e3033 100644 --- a/src/cloudron.js +++ b/src/cloudron.js @@ -115,6 +115,7 @@ function initialize(callback) { if (process.env.BOX_ENV !== 'test') { exports.events.on(exports.EVENT_ACTIVATED, addDnsRecords); + exports.events.on(exports.EVENT_ACTIVATED, sendHeartbeat); // optmization for not waiting till the next 1-min } userdb.count(function (error, count) { @@ -296,8 +297,6 @@ function sendHeartbeat() { } function addDnsRecords() { - if (config.dnsInSync()) return sendHeartbeat(); // already registered send heartbeat - var DKIM_SELECTOR = 'mail'; var DMARC_REPORT_EMAIL = 'dmarc-report@cloudron.io'; @@ -354,7 +353,6 @@ function addDnsRecords() { } debug('addDnsRecords: done'); config.setDnsInSync('DNS is in sync for ip ' + sysinfo.getIp()); - sendHeartbeat(); // send heartbeat after the dns records are done }); }