mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-09 15:10:27 +00:00
Update utils.py
add timeout requests.request for large zones
This commit is contained in:
parent
5e1898c47a
commit
1ccd98a364
@ -3,6 +3,9 @@ import sys
|
||||
import json
|
||||
import requests
|
||||
import urlparse
|
||||
from app import app
|
||||
|
||||
TIMEOUT = app.config['TIMEOUT']
|
||||
|
||||
def auth_from_url(url):
|
||||
auth = None
|
||||
@ -18,7 +21,7 @@ def fetch_remote(remote_url, method='GET', data=None, accept=None, params=None,
|
||||
data = json.dumps(data)
|
||||
|
||||
if timeout is None:
|
||||
timeout = 1.5
|
||||
timeout = TIMEOUT
|
||||
|
||||
verify = False
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user