auditSource: add PLATFORM
This commit is contained in:
14
src/apps.js
14
src/apps.js
@@ -2354,8 +2354,9 @@ async function listBackups(app, page, perPage) {
|
||||
return await backups.getByIdentifierAndStatePaged(app.id, backups.BACKUP_STATE_NORMAL, page, perPage);
|
||||
}
|
||||
|
||||
async function restoreInstalledApps(options) {
|
||||
async function restoreInstalledApps(options, auditSource) {
|
||||
assert.strictEqual(typeof options, 'object');
|
||||
assert.strictEqual(typeof auditSource, 'object');
|
||||
|
||||
let apps = await list();
|
||||
apps = apps.filter(app => app.installationState !== exports.ISTATE_ERROR); // remove errored apps. let them be 'repaired' by hand
|
||||
@@ -2389,7 +2390,9 @@ async function restoreInstalledApps(options) {
|
||||
}
|
||||
}
|
||||
|
||||
async function configureInstalledApps() {
|
||||
async function configureInstalledApps(auditSource) {
|
||||
assert.strictEqual(typeof auditSource, 'object');
|
||||
|
||||
let apps = await list();
|
||||
apps = apps.filter(app => app.installationState !== exports.ISTATE_ERROR); // remove errored apps. let them be 'repaired' by hand
|
||||
apps = apps.filter(app => app.installationState !== exports.ISTATE_PENDING_CONFIGURE); // safeguard against tasks being created non-stop if we crash on startup
|
||||
@@ -2410,8 +2413,9 @@ async function configureInstalledApps() {
|
||||
}
|
||||
}
|
||||
|
||||
async function restartAppsUsingAddons(changedAddons) {
|
||||
async function restartAppsUsingAddons(changedAddons, auditSource) {
|
||||
assert(Array.isArray(changedAddons));
|
||||
assert.strictEqual(typeof auditSource, 'object');
|
||||
|
||||
let apps = await list();
|
||||
apps = apps.filter(app => app.manifest.addons && _.intersection(Object.keys(app.manifest.addons), changedAddons).length !== 0);
|
||||
@@ -2438,7 +2442,9 @@ async function restartAppsUsingAddons(changedAddons) {
|
||||
}
|
||||
|
||||
// auto-restart app tasks after a crash
|
||||
async function schedulePendingTasks() {
|
||||
async function schedulePendingTasks(auditSource) {
|
||||
assert.strictEqual(typeof auditSource, 'object');
|
||||
|
||||
debug('schedulePendingTasks: scheduling app tasks');
|
||||
|
||||
const result = await list();
|
||||
|
||||
Reference in New Issue
Block a user