From 3604ef11b909f6ee53f6b2721c0ad66188826aac Mon Sep 17 00:00:00 2001 From: "joseramon.afonso" Date: Thu, 25 Apr 2019 12:46:37 +0200 Subject: [PATCH 1/3] Fixed multiline --- devo/sender/data.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/devo/sender/data.py b/devo/sender/data.py index 629ac041..369725a8 100644 --- a/devo/sender/data.py +++ b/devo/sender/data.py @@ -264,6 +264,14 @@ def close(self): self.socket.close() self.socket = None + @staticmethod + def __encode_multiline(record): + try: + record = Sender.__encode_record(record) + return b'%d %s' % (len(record), record) + except Exception as error: + raise DevoSenderException(error) + @staticmethod def __encode_record(record): """ @@ -312,7 +320,7 @@ def send_raw(self, record, multiline=False, zipped=False): sent = self.socket.send(self.__encode_record(record)) return 1 if multiline: - record = self.__encode_record(record) + record = self.__encode_multiline(record) sent = self.__send_oc(record) if sent: From 95c2d5808c68acbe63a40d70fb51101cd231b9fb Mon Sep 17 00:00:00 2001 From: "joseramon.afonso" Date: Thu, 25 Apr 2019 12:47:46 +0200 Subject: [PATCH 2/3] Updated versions and changelog --- CHANGELOG.md | 4 ++++ README.md | 2 +- devo/__version__.py | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23971650..275792f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [2.2.4] - 2019-04-25 +#### Fixed + * Fixed multiline sending introduced in version 1.3.0 + ## [2.2.3] - 2019-04-22 #### Fixed * Fixed bug in Sender CLI introduced in version 2.2.2 diff --git a/README.md b/README.md index d2d53388..792971dd 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ [![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) -[![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/) +[![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/) # Devo Python SDK diff --git a/devo/__version__.py b/devo/__version__.py index 3e6a119c..731f0b57 100644 --- a/devo/__version__.py +++ b/devo/__version__.py @@ -1,6 +1,6 @@ __description__ = 'Devo Python Library.' __url__ = 'http://www.devo.com' -__version__ = "2.2.3" +__version__ = "2.2.4" __author__ = 'Devo' __author_email__ = 'support@devo.com' __license__ = 'MIT' From e12b67162e390ef761aac954c2ce7cb85c40f32f Mon Sep 17 00:00:00 2001 From: "joseramon.afonso" Date: Thu, 25 Apr 2019 12:48:32 +0200 Subject: [PATCH 3/3] Updated API endopoints in documentation --- docs/api/api.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/api/api.md b/docs/api/api.md index 7bf29277..3e9640a9 100644 --- a/docs/api/api.md +++ b/docs/api/api.md @@ -5,8 +5,8 @@ This library performs queries to the Client API (Search rest api) of Devo. ## Endpoints ##### API To perform a request with API, first choose the required endpoint depending on the region your are accessing from: - * **USA:** https://api-us.devo.com/search/query - * **EU:** https://api-eu.devo.com/search/query + * **USA:** https://apiv2-us.devo.com/search/query + * **EU:** https://apiv2-eu.devo.com/search/query You have more information in the official documentation of Devo, [REST API v2](https://docs.devo.com/confluence/ndt/api-reference/rest-api-v2) . @@ -19,9 +19,9 @@ You have more information in the official documentation of Devo, [REST API v2](h - jwt: JWT token - url(optional): The url of the service. A static constants are provided with the commons clouds: can take several values, for example: - - Client.URL_AWS_EU: https://api-eu.logtrust.com - - Client.URL_AWS_USA: https://api-us.logtrust.com - - Client.URL_VDC: https://spainapi.logtrust.com + - Client.URL_AWS_EU: https://apiv2-eu.devo.com + - Client.URL_AWS_USA: https://apiv2-us.devo.com + - Client.URL_VDC: https://spainapi.devo.com - Client.URL_QUERY_COMPLEMENT = '/search/query' - buffer (optional): Buffer object if you modify the Devo Buffer class