rename subdomains.update to subdomains.upsert

This commit is contained in:
Girish Ramakrishnan
2016-09-05 16:41:04 -07:00
parent 4fc6eb1876
commit ecc9d1bc02
6 changed files with 12 additions and 24 deletions

View File

@@ -253,7 +253,7 @@ function registerSubdomain(app, callback) {
async.retry({ times: 200, interval: 5000 }, function (retryCallback) {
debugApp(app, 'Registering subdomain location [%s]', app.location);
subdomains.update(app.location, 'A', [ ip ], function (error, changeId) {
subdomains.upsert(app.location, 'A', [ ip ], function (error, changeId) {
if (error && (error.reason === SubdomainError.STILL_BUSY || error.reason === SubdomainError.EXTERNAL_ERROR)) return retryCallback(error); // try again
retryCallback(null, error || changeId);