Skip to content

Commit a578686

Browse files
authored
Merge pull request #60 from Worvast/master
Fixed multiline sending
2 parents 39e32dc + e12b671 commit a578686

File tree

5 files changed

+20
-8
lines changed

5 files changed

+20
-8
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [2.2.4] - 2019-04-25
8+
#### Fixed
9+
* Fixed multiline sending introduced in version 1.3.0
10+
711
## [2.2.3] - 2019-04-22
812
#### Fixed
913
* Fixed bug in Sender CLI introduced in version 2.2.2

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
[![master Build Status](https://travis-ci.com/DevoInc/python-sdk.svg?branch=master)](https://travis-ci.com/DevoInc/python-sdk) [![LICENSE](https://img.shields.io/dub/l/vibe-d.svg)](https://github.com/DevoInc/python-sdk/blob/master/LICENSE)
33

4-
[![wheel](https://img.shields.io/badge/wheel-yes-brightgreen.svg)](https://pypi.org/project/devo-sdk/) [![version](https://img.shields.io/badge/version-2.2.3-blue.svg)](https://pypi.org/project/devo-sdk/) [![python](https://img.shields.io/badge/python-2.7%20%7C%203.3%20%7C%203.4%20%7C%203.5%20%7C%203.6%20%7C%203.7-blue.svg)](https://pypi.org/project/devo-sdk/)
4+
[![wheel](https://img.shields.io/badge/wheel-yes-brightgreen.svg)](https://pypi.org/project/devo-sdk/) [![version](https://img.shields.io/badge/version-2.2.4-blue.svg)](https://pypi.org/project/devo-sdk/) [![python](https://img.shields.io/badge/python-2.7%20%7C%203.3%20%7C%203.4%20%7C%203.5%20%7C%203.6%20%7C%203.7-blue.svg)](https://pypi.org/project/devo-sdk/)
55

66

77
# Devo Python SDK

devo/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
__description__ = 'Devo Python Library.'
22
__url__ = 'http://www.devo.com'
3-
__version__ = "2.2.3"
3+
__version__ = "2.2.4"
44
__author__ = 'Devo'
55
__author_email__ = 'support@devo.com'
66
__license__ = 'MIT'

devo/sender/data.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,14 @@ def close(self):
264264
self.socket.close()
265265
self.socket = None
266266

267+
@staticmethod
268+
def __encode_multiline(record):
269+
try:
270+
record = Sender.__encode_record(record)
271+
return b'%d %s' % (len(record), record)
272+
except Exception as error:
273+
raise DevoSenderException(error)
274+
267275
@staticmethod
268276
def __encode_record(record):
269277
"""
@@ -312,7 +320,7 @@ def send_raw(self, record, multiline=False, zipped=False):
312320
sent = self.socket.send(self.__encode_record(record))
313321
return 1
314322
if multiline:
315-
record = self.__encode_record(record)
323+
record = self.__encode_multiline(record)
316324

317325
sent = self.__send_oc(record)
318326
if sent:

docs/api/api.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ This library performs queries to the Client API (Search rest api) of Devo.
55
## Endpoints
66
##### API
77
To perform a request with API, first choose the required endpoint depending on the region your are accessing from:
8-
* **USA:** https://api-us.devo.com/search/query
9-
* **EU:** https://api-eu.devo.com/search/query
8+
* **USA:** https://apiv2-us.devo.com/search/query
9+
* **EU:** https://apiv2-eu.devo.com/search/query
1010

1111
You have more information in the official documentation of Devo, [REST API v2](https://docs.devo.com/confluence/ndt/api-reference/rest-api-v2) .
1212

@@ -19,9 +19,9 @@ You have more information in the official documentation of Devo, [REST API v2](h
1919
- jwt: JWT token
2020
- url(optional): The url of the service. A static constants are provided with
2121
the commons clouds: can take several values, for example:
22-
- Client.URL_AWS_EU: https://api-eu.logtrust.com
23-
- Client.URL_AWS_USA: https://api-us.logtrust.com
24-
- Client.URL_VDC: https://spainapi.logtrust.com
22+
- Client.URL_AWS_EU: https://apiv2-eu.devo.com
23+
- Client.URL_AWS_USA: https://apiv2-us.devo.com
24+
- Client.URL_VDC: https://spainapi.devo.com
2525
- Client.URL_QUERY_COMPLEMENT = '/search/query'
2626
- buffer (optional): Buffer object if you modify the Devo Buffer class
2727

0 commit comments

Comments
 (0)