dnstools: make timeouts configurable via ENV, travis: use longer timeouts
This commit is contained in:
parent
cc4cd1c805
commit
e2e07b60e3
@ -6,6 +6,8 @@ python:
|
|||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- SECRET_KEY=justfortravis
|
- SECRET_KEY=justfortravis
|
||||||
|
- DNS_RESOLVER_TIMEOUT=15.0
|
||||||
|
- DNS_UPDATE_TIMEOUT=30.0
|
||||||
matrix:
|
matrix:
|
||||||
- DJANGO=1.5.5
|
- DJANGO=1.5.5
|
||||||
- DJANGO=1.6.1
|
- DJANGO=1.6.1
|
||||||
|
@ -4,11 +4,13 @@ Misc. DNS related code: query, dynamic update, etc.
|
|||||||
Usually, higher level code wants to call the add/update/delete functions.
|
Usually, higher level code wants to call the add/update/delete functions.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
# time to wait for dns name resolving [s]
|
# time to wait for dns name resolving [s]
|
||||||
RESOLVER_TIMEOUT = 5.0
|
RESOLVER_TIMEOUT = float(os.environ.get('DNS_RESOLVER_TIMEOUT', '5.0'))
|
||||||
|
|
||||||
# time to wait for dns name updating [s]
|
# time to wait for dns name updating [s]
|
||||||
UPDATE_TIMEOUT = 20.0
|
UPDATE_TIMEOUT = float(os.environ.get('DNS_UPDATE_TIMEOUT', '20.0'))
|
||||||
|
|
||||||
# time after we retry to reach a previously unreachable ns [s]
|
# time after we retry to reach a previously unreachable ns [s]
|
||||||
UNAVAILABLE_RETRY = 300.0
|
UNAVAILABLE_RETRY = 300.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user