get rid of all the NOOP_CALLBACKs
This commit is contained in:
+3
-5
@@ -30,10 +30,8 @@ const assert = require('assert'),
|
||||
util = require('util'),
|
||||
_ = require('underscore');
|
||||
|
||||
const NOOP_CALLBACK = function (error) { if (error) debug(error); };
|
||||
|
||||
// we cannot use tasks since the tasks table gets overwritten when db is imported
|
||||
let gProvisionStatus = {
|
||||
const gProvisionStatus = {
|
||||
setup: {
|
||||
active: false,
|
||||
message: '',
|
||||
@@ -136,7 +134,7 @@ async function activate(username, password, email, displayName, ip, auditSource)
|
||||
|
||||
eventlog.add(eventlog.ACTION_ACTIVATE, auditSource, {});
|
||||
|
||||
setImmediate(cloudron.onActivated.bind(null, {}, NOOP_CALLBACK));
|
||||
setImmediate(() => safe(cloudron.onActivated({}), { debug }));
|
||||
|
||||
return {
|
||||
userId: ownerId,
|
||||
@@ -164,7 +162,7 @@ async function restoreTask(backupConfig, backupId, sysinfoConfig, options, audit
|
||||
await settings.setBackupCredentials(backupConfig); // update just the credentials and not the policy and flags
|
||||
await eventlog.add(eventlog.ACTION_RESTORE, auditSource, { backupId });
|
||||
|
||||
setImmediate(cloudron.onActivated.bind(null, options, NOOP_CALLBACK));
|
||||
setImmediate(() => safe(cloudron.onActivated(options), { debug }));
|
||||
} catch (error) {
|
||||
gProvisionStatus.restore.errorMessage = error ? error.message : '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user