more debugs

This commit is contained in:
Girish Ramakrishnan
2016-06-22 11:48:53 -05:00
parent ce116e56bf
commit 2a761a52d3
2 changed files with 3 additions and 0 deletions

View File

@@ -64,6 +64,7 @@ function initialize(callback) {
// database dir and we cannot call service scripts until that's done.
// TODO: make this smarter to not wait for 30secs for the crash-restart case
gPlatformReadyTimer = setTimeout(function () {
debug('emitting platform ready');
gPlatformReadyTimer = null;
exports.events.emit(exports.EVENT_READY);
}, 30000);

View File

@@ -74,8 +74,10 @@ function waitForPendingTasks(callback) {
function platformReady() {
if (cloudron.isConfiguredSync()) {
debug('platformReady: configured, resuming tasks');
resumeTasks();
} else {
debug('platformReady: not configured yet. waiting for configured event');
cloudron.events.on(cloudron.EVENT_CONFIGURED, resumeTasks);
}
}