Skip to content

Commit 250b5f3

Browse files
authored
Merge pull request #142 from DevoInc/fix/PAR_12954
(fix) Some events are not sent completely
2 parents 537a8b8 + 52e0b59 commit 250b5f3

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ 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+
## [3.6.1] - 2022-05-19
8+
### Fixed
9+
* Some events are not sent completely due to the use of `socket.send()` instead of `socket.sendall()` [#141]
10+
11+
712
## [3.6.1] - 2022-05-19
813
### Fixed
914
* Dependencies added to `setup.py`

README.md

Lines changed: 2 additions & 2 deletions
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-3.6.1-blue.svg)](https://pypi.org/project/devo-sdk/) [![python](https://img.shields.io/badge/python-3.5%20%7C%203.6%20%7C%203.7%20%7C%203.8%20%7C%203.9-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-3.6.2-blue.svg)](https://pypi.org/project/devo-sdk/) [![python](https://img.shields.io/badge/python-3.5%20%7C%203.6%20%7C%203.7%20%7C%203.8%20%7C%203.9-blue.svg)](https://pypi.org/project/devo-sdk/)
55

66

77
# Devo Python SDK
@@ -83,7 +83,7 @@ To perform a request with API, first choose the required endpoint depending on t
8383
| Europe | https://apiv2-eu.devo.com/search/query |
8484
| VDC | https://apiv2-es.devo.com/search/query |
8585

86-
You have more information in the official documentation of Devo, [REST API](https://docs.devo.com/confluence/ndt/api-reference/rest-api) .
86+
You have more information in the official documentation of Devo, [REST API](https://docs.devo.com/confluence/ndt/latest/api-reference/query-api) .
8787

8888
## Credentials
8989
To obtain the access credentials necessary to use this SDK, you must have an account in [DEVO](https://www.devo.com/).<br/>

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__ = "3.6.1"
3+
__version__ = "3.6.2"
44
__author__ = 'Devo'
55
__author_email__ = 'support@devo.com'
66
__license__ = 'MIT'

devo/sender/data.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -551,9 +551,11 @@ def __send_oc(self, record):
551551
if msg_size % 4096 > 0:
552552
total += 1
553553
for iteration in range(0, total):
554-
sent += self.socket.send(
555-
record[int(iteration * 4096):
556-
int((iteration + 1) * 4096)])
554+
part = record[int(iteration * 4096):
555+
int((iteration + 1) * 4096)]
556+
if self.socket.sendall(part) is not None:
557+
raise DevoSenderException("Send error")
558+
sent += len(part)
557559
if sent == 0:
558560
raise DevoSenderException("Send error")
559561
return sent
@@ -573,7 +575,10 @@ def send_raw(self, record, multiline=False, zip=False):
573575
if self.socket:
574576
try:
575577
if not multiline and not zip:
576-
sent = self.socket.send(self.__encode_record(record))
578+
msg = self.__encode_record(record)
579+
sent = len(msg)
580+
if self.socket.sendall(msg) is not None:
581+
raise DevoSenderException("Send error")
577582
return 1
578583
if multiline:
579584
record = self.__encode_multiline(record)

0 commit comments

Comments
 (0)