get rid of all the NOOP_CALLBACKs

This commit is contained in:
Girish Ramakrishnan
2021-09-17 09:22:46 -07:00
parent b3fe2a4b84
commit c5794b5ecd
8 changed files with 88 additions and 122 deletions

View File

@@ -161,8 +161,6 @@ const appstore = require('./appstore.js'),
validator = require('validator'),
_ = require('underscore');
const NOOP_CALLBACK = function (error) { if (error) debug(error); };
const APPS_FIELDS_PREFIXED = [ 'apps.id', 'apps.appStoreId', 'apps.installationState', 'apps.errorJson', 'apps.runState',
'apps.health', 'apps.containerId', 'apps.manifestJson', 'apps.accessRestrictionJson', 'apps.memoryLimit', 'apps.cpuShares',
'apps.label', 'apps.tagsJson', 'apps.taskId', 'apps.reverseProxyConfigJson', 'apps.servicesConfigJson',
@@ -1499,8 +1497,8 @@ async function setDataDir(app, dataDir, auditSource) {
const task = {
args: { newDataDir: dataDir },
values: { },
onFinished: (error) => {
if (!error) services.rebuildService('sftp', NOOP_CALLBACK);
onFinished: async (error) => {
if (!error) await safe(services.rebuildService('sftp'), { debug });
}
};
const taskId = await addTask(appId, exports.ISTATE_PENDING_DATA_DIR_MIGRATION, task);