pass debug to promise-retry
This commit is contained in:
@@ -17,11 +17,8 @@ async function getServerIp(config) {
|
||||
|
||||
if (process.env.BOX_ENV === 'test') return '127.0.0.1';
|
||||
|
||||
let attempt = 0;
|
||||
|
||||
return await promiseRetry({ times: 10, interval: 5000 }, async () => {
|
||||
if (attempt) debug(`getServerIp: getting server IP. attempt ${attempt}`);
|
||||
++attempt;
|
||||
return await promiseRetry({ times: 10, interval: 5000, debug }, async () => {
|
||||
debug('getServerIp: getting server IP');
|
||||
|
||||
const [networkError, response] = await safe(superagent.get('https://api.cloudron.io/api/v1/helper/public_ip')
|
||||
.timeout(30 * 1000)
|
||||
|
||||
Reference in New Issue
Block a user