Skip to content

Commit

Permalink
_id changed to id in API class
Browse files Browse the repository at this point in the history
  • Loading branch information
RamanjaneyuluIdavalapati committed Jun 8, 2018
1 parent d41cc91 commit c634e4a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ deploy:
- LICENSE
- kwikapi/api.py
- kwikapi/__init__.py
name: kwikapi-0.2.5
tag_name: 0.2.5
name: kwikapi-0.2.6
tag_name: 0.2.6
on:
repo: deep-compute/kwikapi
- provider: pypi
Expand Down
10 changes: 5 additions & 5 deletions kwikapi/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def id(self):
_id = self.headers.get(REQUEST_ID_HEADER, '')
if _id:
return '{}.{}'.format(_id, self._id)
return _id
return self._id

@abc.abstractproperty
def url(self):
Expand Down Expand Up @@ -182,13 +182,13 @@ class API(object):

THREADPOOL_SIZE = 32

def __init__(self, default_version=None, _id='',
def __init__(self, default_version=None, id='',
threadpool=None, threadpool_size=THREADPOOL_SIZE,
log=DUMMY_LOG):

self._api_funcs = {}
self.log = log.bind(api_id=_id)
self._id = _id
self.log = log.bind(api_id=id)
self._id = id
self.default_version = default_version

self.threadpool = None
Expand Down Expand Up @@ -480,7 +480,7 @@ def handle_request(self, request):
message = '[(%s) %s: %s]' % (self.api._id, e.__class__.__name__, message)

_log = request.log if hasattr(request, 'log') else self.log
self.log.exception('handle_request_error', message=message)
_log.exception('handle_request_error', message=message)
response.write(dict(success=False, message=message), protocol)

response.flush()
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import setup, find_packages

version = '0.2.5'
version = '0.2.6'
setup(
name="kwikapi",
version=version,
Expand Down

0 comments on commit c634e4a

Please sign in to comment.