Fixup repair route
* Do not allow scheduling tasks in error state * Only repair is allowed in error state * Use the error object to track what to 'repair' (like the lastState) * If uninstall failed, repair will do uninstall * If move dir failed, repair will do move dir
This commit is contained in:
@@ -458,7 +458,11 @@ function setTask(appId, values, callback) {
|
||||
assert.strictEqual(typeof values, 'object');
|
||||
assert.strictEqual(typeof callback, 'function');
|
||||
|
||||
updateWithConstraints(appId, values, 'AND taskId IS NULL', callback);
|
||||
if (values.installationState === 'pending_repair') { // FIXME
|
||||
updateWithConstraints(appId, values, 'AND taskId IS NULL AND installationState == "error"', callback);
|
||||
} else {
|
||||
updateWithConstraints(appId, values, 'AND taskId IS NULL AND installationState != "error"', callback);
|
||||
}
|
||||
}
|
||||
|
||||
function getAppStoreIds(callback) {
|
||||
|
||||
Reference in New Issue
Block a user