Skip to content

Commit 9025638

Browse files
author
Maria Korlotian
authored
Update the timeout (#84)
1 parent e352edc commit 9025638

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ import and configure the library with your Castle API secret.
2929
# For authenticate method you can set failover strategies: allow(default), deny, challenge, throw
3030
configuration.failover_strategy = 'deny'
3131
32-
# Castle::RequestError is raised when timing out in milliseconds (default: 500 milliseconds)
33-
configuration.request_timeout = 1000
32+
# Castle::RequestError is raised when timing out in milliseconds (default: 1000 milliseconds)
33+
configuration.request_timeout = 1500
3434
3535
# Base Castle API url
3636
# configuration.base_url = "https://api.castle.io/v1"

castle/configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
# API endpoint
3131
BASE_URL = 'https://api.castle.io/v1'
3232
FAILOVER_STRATEGY = 'allow'
33-
# 500 milliseconds
34-
REQUEST_TIMEOUT = 500
33+
# 1000 milliseconds
34+
REQUEST_TIMEOUT = 1000
3535
# regexp of trusted proxies which is always appended to the trusted proxy list
3636
FAILOVER_STRATEGIES = ['allow', 'deny', 'challenge', 'throw']
3737
TRUSTED_PROXIES = [r"""

castle/test/configuration_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def test_default_values(self):
1313
self.assertEqual(config.base_url.path, '/v1')
1414
self.assertEqual(config.allowlisted, [])
1515
self.assertEqual(config.denylisted, [])
16-
self.assertEqual(config.request_timeout, 500)
16+
self.assertEqual(config.request_timeout, 1000)
1717
self.assertEqual(config.failover_strategy, 'allow')
1818
self.assertEqual(config.ip_headers, [])
1919
self.assertEqual(config.trusted_proxies, [])

0 commit comments

Comments
 (0)