replace delay.js with timers/promises
This commit is contained in:
@@ -35,7 +35,6 @@ const apps = require('./apps.js'),
|
||||
constants = require('./constants.js'),
|
||||
cron = require('./cron.js'),
|
||||
debug = require('debug')('box:cloudron'),
|
||||
delay = require('./delay.js'),
|
||||
dns = require('./dns.js'),
|
||||
dockerProxy = require('./dockerproxy.js'),
|
||||
eventlog = require('./eventlog.js'),
|
||||
@@ -54,6 +53,7 @@ const apps = require('./apps.js'),
|
||||
shell = require('./shell.js'),
|
||||
sysinfo = require('./sysinfo.js'),
|
||||
tasks = require('./tasks.js'),
|
||||
timers = require('timers/promises'),
|
||||
users = require('./users.js');
|
||||
|
||||
const REBOOT_CMD = path.join(__dirname, 'scripts/reboot.sh');
|
||||
@@ -85,7 +85,7 @@ async function onActivated(options) {
|
||||
|
||||
// disable responding to api calls via IP to not leak domain info. this is carefully placed as the last item, so it buys
|
||||
// the UI some time to query the dashboard domain in the restore code path
|
||||
await delay(30000);
|
||||
await timers.setTimeout(30000);
|
||||
await reverseProxy.writeDefaultConfig({ activated :true });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user