From 36f31d10c4c3407eb1803ca6361e09c035fcdae2 Mon Sep 17 00:00:00 2001 From: shawnbutts Date: Fri, 30 Sep 2016 18:24:58 -0400 Subject: [PATCH 1/3] fix error log message --- netuitive/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netuitive/client.py b/netuitive/client.py index 895f290..521710b 100644 --- a/netuitive/client.py +++ b/netuitive/client.py @@ -114,7 +114,7 @@ def post(self, element): else: logging.exception( 'error posting payload to api ingest endpoint (%s): %s', - self.eventurl, e) + self.dataurl, e) except Exception as e: logging.exception( From 3b1a0ee92df5d0c15566c8799468b9ac49712773 Mon Sep 17 00:00:00 2001 From: shawnbutts Date: Fri, 30 Sep 2016 18:26:22 -0400 Subject: [PATCH 2/3] fix millisecond timestamps --- netuitive/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netuitive/util.py b/netuitive/util.py index fb67a59..ab12881 100644 --- a/netuitive/util.py +++ b/netuitive/util.py @@ -6,7 +6,7 @@ def to_ms_timestamp(dt, epoch=datetime(1970, 1, 1)): td = dt - epoch - return (td.microseconds + (td.seconds + td.days * 86400) * 10**3) + return ((td.microseconds + (td.seconds + td.days * 86400) * 10**6) / 10**3) def to_ms_timestamp_int(dt, epoch=datetime(1970, 1, 1)): From 16390036db0bb652070835f58b870b4153eb0906 Mon Sep 17 00:00:00 2001 From: shawnbutts Date: Fri, 30 Sep 2016 18:31:16 -0400 Subject: [PATCH 3/3] 0.2.2 --- .bumpversion.cfg | 2 +- HISTORY.rst | 5 +++++ netuitive/__init__.py | 2 +- setup.py | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index beffb19..7009635 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.2.1 +current_version = 0.2.2 commit = False tag = False files = setup.py netuitive/__init__.py diff --git a/HISTORY.rst b/HISTORY.rst index 4764faa..c2d8552 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,11 @@ History ------- +0.2.2 (2016-09-30) +--------------------- + +* fix millisecond timestamps + 0.2.1 (2016-09-30) --------------------- diff --git a/netuitive/__init__.py b/netuitive/__init__.py index 1eb40a3..064d71d 100644 --- a/netuitive/__init__.py +++ b/netuitive/__init__.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- __author__ = 'Netuitive, Inc' -__version__ = '0.2.1' +__version__ = '0.2.2' from .client import Client # nopep8 # flake8: noqa from .element import Element # nopep8 # flake8: noqa diff --git a/setup.py b/setup.py index c7115ff..34855b9 100755 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ setup( name='netuitive', - version='0.2.1', + version='0.2.2', description="Python Client for Netuitive Cloud", long_description=readme + '\n\n' + history, author="Netuitive",