unify update check into a single job
This commit is contained in:
@@ -24,7 +24,6 @@ exports = module.exports = {
|
||||
};
|
||||
|
||||
let assert = require('assert'),
|
||||
async = require('async'),
|
||||
auditSource = require('../auditsource.js'),
|
||||
BoxError = require('../boxerror.js'),
|
||||
cloudron = require('../cloudron.js'),
|
||||
@@ -204,10 +203,7 @@ function checkForUpdates(req, res, next) {
|
||||
// it can take a while sometimes to get all the app updates one by one
|
||||
req.clearTimeout();
|
||||
|
||||
async.series([
|
||||
(done) => updateChecker.checkAppUpdates({ automatic: false }, done),
|
||||
(done) => updateChecker.checkBoxUpdates({ automatic: false }, done),
|
||||
], function () {
|
||||
updateChecker.checkForUpdates({ automatic: false }, function () {
|
||||
next(new HttpSuccess(200, { update: updateChecker.getUpdateInfo() }));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user