Kill more event based logic
This commit is contained in:
@@ -24,11 +24,7 @@ exports = module.exports = {
|
||||
checkDiskSpace: checkDiskSpace,
|
||||
|
||||
readDkimPublicKeySync: readDkimPublicKeySync,
|
||||
refreshDNS: refreshDNS,
|
||||
|
||||
events: null,
|
||||
|
||||
EVENT_ACTIVATED: 'activated'
|
||||
refreshDNS: refreshDNS
|
||||
};
|
||||
|
||||
var appdb = require('./appdb.js'),
|
||||
@@ -126,8 +122,6 @@ CloudronError.SELF_UPGRADE_NOT_SUPPORTED = 'Self upgrade not supported';
|
||||
function initialize(callback) {
|
||||
assert.strictEqual(typeof callback, 'function');
|
||||
|
||||
exports.events = new (require('events').EventEmitter)();
|
||||
|
||||
gConfigState = { dns: false, tls: false, configured: false };
|
||||
gUpdatingDns = false;
|
||||
gBoxAndUserDetails = null;
|
||||
@@ -144,8 +138,6 @@ function initialize(callback) {
|
||||
function uninitialize(callback) {
|
||||
assert.strictEqual(typeof callback, 'function');
|
||||
|
||||
exports.events = null;
|
||||
|
||||
async.series([
|
||||
cron.uninitialize,
|
||||
mailer.stop,
|
||||
@@ -322,7 +314,7 @@ function activate(username, password, email, displayName, ip, auditSource, callb
|
||||
|
||||
eventlog.add(eventlog.ACTION_ACTIVATE, auditSource, { });
|
||||
|
||||
exports.events.emit(exports.EVENT_ACTIVATED);
|
||||
platform.createMailConfig(NOOP_CALLBACK); // bounces can now be sent to the cloudron owner
|
||||
|
||||
callback(null, { token: token, expires: expires });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user