Show actual result on applyChanges(). Remove generated assets files

This commit is contained in:
Khanh Ngo
2019-12-11 13:45:27 +07:00
parent 67e6df6880
commit 798b7abb5b
9 changed files with 15 additions and 7239 deletions

View File

@ -544,18 +544,15 @@ class Domain(db.Model):
headers = {}
headers['X-API-Key'] = self.PDNS_API_KEY
try:
utils.fetch_json(urljoin(
r = utils.fetch_json(urljoin(
self.PDNS_STATS_URL, self.API_EXTENDED_URL +
'/servers/localhost/zones/{0}/axfr-retrieve'.format(
domain.name)),
headers=headers,
timeout=int(
Setting().get('pdns_api_timeout')),
method='PUT')
return {
'status': 'ok',
'msg': 'Update from Master successfully'
}
headers=headers,
timeout=int(
Setting().get('pdns_api_timeout')),
method='PUT')
return {'status': 'ok', 'msg': r.get('result')}
except Exception as e:
current_app.logger.error(
'Cannot update from master. DETAIL: {0}'.format(e))