retry setting memory of services

This commit is contained in:
Girish Ramakrishnan
2020-09-22 21:42:47 -07:00
parent 191be658d5
commit 3c565defca
2 changed files with 6 additions and 2 deletions

View File

@@ -812,7 +812,9 @@ function updateServiceConfig(platformConfig, callback) {
}
const args = `update --memory ${memory} --memory-swap ${memorySwap} ${serviceName}`.split(' ');
shell.spawn(`updateServiceConfig(${serviceName})`, '/usr/bin/docker', args, { }, iteratorCallback);
async.retry({ times: 10, interval: 60 * 1000 }, function (retryCallback) {
shell.spawn(`updateServiceConfig(${serviceName})`, '/usr/bin/docker', args, { }, retryCallback);
}, iteratorCallback);
}, callback);
}