updateServiceConfig: remove retry from platform code

This commit is contained in:
Girish Ramakrishnan
2020-09-22 21:45:22 -07:00
parent 3c565defca
commit 4da8c8d6db
4 changed files with 12 additions and 15 deletions

View File

@@ -90,20 +90,11 @@ function onPlatformReady(infraChanged) {
}
function applyPlatformConfig(callback) {
// scale back db containers, if possible. this is retried because updating memory constraints can fail
// with failed to write to memory.memsw.limit_in_bytes: write /sys/fs/cgroup/memory/docker/xx/memory.memsw.limit_in_bytes: device or resource busy
settings.getPlatformConfig(function (error, platformConfig) {
if (error) return callback(error);
async.retry({ times: 10, interval: 5 * 60 * 1000 }, function (retryCallback) {
settings.getPlatformConfig(function (error, platformConfig) {
if (error) return retryCallback(error);
addons.updateServiceConfig(platformConfig, function (error) {
if (error) debug('Error updating services. Will rety in 5 minutes', platformConfig, error);
retryCallback(error);
});
});
}, callback);
addons.updateServiceConfig(platformConfig, callback);
});
}
function pruneInfraImages(callback) {