Commit a5274012 authored by Ignacio Corderi's avatar Ignacio Corderi
Browse files

Added KINETIC_CONNECT_TIMEOUT env variable. Closes #28

parent e37b5ad3
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -2,6 +2,21 @@ Changes since 0.8.2
===========================
>**NOTE:** this section will document changes to the library since the last release

## Major changes
- `AsyncClient` has been renamed to `Client`
- A new `SecureClient` has been added to `kinetic`.

## Minor changes
- Added env variable _KINETIC_CONNECT_TIMEOUT_ to control default connection timeout.

## Deprecated features
- Old blocking `Client` has been moved to `kinetic.depracated.BlockingClient`
- Old `AdminClient` has been moved to `kinetic.depracated.AdminClient`

## Misc
- Added alias for `AsyncClient = Client` to smooth transition.
- Added alias on `kinetic` for `AdminClient` to smooth transition.

Changes from 0.8.1 to 0.8.2
===========================

+1 −1
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ class BaseClient(object):
    def __init__(self, hostname=HOSTNAME, port=PORT, identity=USER_ID,
                 cluster_version=None, secret=CLIENT_SECRET,
                 chunk_size=common.DEFAULT_CHUNK_SIZE,
                 connect_timeout=common.DEFAULT_CONNECT_TIMEOUT,
                 connect_timeout=common.KINETIC_CONNECT_TIMEOUT,
                 socket_timeout=common.DEFAULT_SOCKET_TIMEOUT,
                 socket_address=None, socket_port=0,
                 defer_read=False,
+7 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@

import kinetic_pb2 as messages
import eventlet
import os

MAX_KEY_SIZE = 4*1024
MAX_VALUE_SIZE = 1024*1024
@@ -26,6 +27,12 @@ DEFAULT_CONNECT_TIMEOUT = 0.1
DEFAULT_SOCKET_TIMEOUT = 5
DEFAULT_CHUNK_SIZE = 64*1024

# Env variables
try: 
    KINETIC_CONNECT_TIMEOUT = float(os.environ.get('KINETIC_CONNECT_TIMEOUT', DEFAULT_CONNECT_TIMEOUT))
except:
    KINETIC_CONNECT_TIMEOUT = DEFAULT_CONNECT_TIMEOUT
    
local = messages.Local()

class DeferedValue():