Split dashboard dns setup and db operations

The dns setup is now a task that we can wait on. Once that task
is done, we can do db operations to switch the domain in a separate
route
This commit is contained in:
Girish Ramakrishnan
2018-12-14 09:57:28 -08:00
parent 357e44284d
commit bdf9671280
8 changed files with 53 additions and 70 deletions
+2
View File
@@ -6,6 +6,7 @@ var assert = require('assert'),
backups = require('./backups.js'),
database = require('./database.js'),
debug = require('debug')('box:taskworker'),
domains = require('./domains.js'),
reverseProxy = require('./reverseproxy.js'),
tasks = require('./tasks.js'),
updater = require('./updater.js');
@@ -16,6 +17,7 @@ const TASKS = { // indexed by task type
backup: backups.backupBoxAndApps,
update: updater.update,
renewcerts: reverseProxy.renewCerts,
dashboardDns: domains.setDashboardDnsRecord,
_identity: (arg, progressCallback, callback) => callback(null, arg),
_error: (arg, progressCallback, callback) => callback(new Error(`Failed for arg: ${arg}`)),