EE API is synchronous

This commit is contained in:
Girish Ramakrishnan
2015-10-27 22:18:02 -07:00
parent 09c4bfeb51
commit f39809c941

View File

@@ -195,7 +195,9 @@ function activate(username, password, email, ip, callback) {
if (error) return callback(new CloudronError(CloudronError.INTERNAL_ERROR, error));
gIsActivated = true;
exports.events.emit(exports.EVENT_ACTIVATED);
// EE API is sync. do not keep the REST API reponse waiting
process.nextTick(function () { exports.events.emit(exports.EVENT_ACTIVATED); });
callback(null, { token: token, expires: expires });
});