Skip to content

Commit 5c55ab1

Browse files
author
joseramon.afonso
committed
Fixed problems with version 3.0.2 of devo-sdk
1 parent e083ff7 commit 5c55ab1

File tree

6 files changed

+10
-8
lines changed

6 files changed

+10
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[![relese-next Build Status](https://travis-ci.com/DevoInc/python-utils.svg?branch=master)](https://travis-ci.com/DevoInc/python-utils) [![LICENSE](https://img.shields.io/dub/l/vibe-d.svg)](https://github.com/DevoInc/python-utils/blob/master/LICENSE)
22

3-
[![wheel](https://img.shields.io/badge/wheel-yes-brightgreen.svg)](https://pypi.org/project/devo-utils/) [![version](https://img.shields.io/badge/version-2.0.0-blue.svg)](https://pypi.org/project/devo-utils/) [![python](https://img.shields.io/badge/python-3.5%20%7C%203.6%20%7C%203.7-blue.svg)](https://pypi.org/project/devo-utils/)
3+
[![wheel](https://img.shields.io/badge/wheel-yes-brightgreen.svg)](https://pypi.org/project/devo-utils/) [![version](https://img.shields.io/badge/version-2.0.1-blue.svg)](https://pypi.org/project/devo-utils/) [![python](https://img.shields.io/badge/python-3.5%20%7C%203.6%20%7C%203.7-blue.svg)](https://pypi.org/project/devo-utils/)
44

55

66
# Devo Python Utils

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

devoutils/faker/senders/base_sender.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def __init__(self, engine, template, **kwargs):
2525
self.dont_remove_microseconds = kwargs.get('dont_remove_microseconds',
2626
False)
2727
self.parser = TemplateParser()
28+
self.date_generator = kwargs.get('date_generator', None)
2829

2930
def process(self, date_generator=None, **kwargs):
3031
"""Process template"""

devoutils/faker/senders/batch_sender.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ def date_range(start_date, end_date, freq, prob,
2727
date_format="%Y-%m-%d %H:%M:%S.%f",
2828
dont_remove_microseconds=True):
2929
"""
30-
Generates datetime objects between a start date and an end date with
30+
Generates dateti
31+
:param start_date:me objects between a start date and an end date with
3132
some given frequency,
3233
Some events can be piled up in the same millisecond, this happens
3334
sometimes with real data.
3435
:param frequency_ms:
35-
:param start_date:
3636
:param end_date:
3737
:return:
3838
"""

devoutils/faker/senders/syslog_sender.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ def __init__(self, engine, template, **kwargs):
1414
def run(self):
1515
"""Run function for cli or call function"""
1616
while True:
17-
lines = self.process().split('\n')
17+
lines = self.process(date_generator=self.date_generator).split('\n')
1818
for line in lines:
1919
if self.probability():
20-
self.engine.send(tag=self.tag, msg=str(line))
20+
if not self.simulation:
21+
self.engine.send(tag=self.tag, msg=str(line))
2122
now = datetime.utcnow().ctime()
2223
print('{0} => {1}'.format(now, str(line)))
2324
else:

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
"Programming Language :: Python :: Implementation :: PyPy",
2424
"Topic :: Software Development :: Libraries :: Python Modules",
2525
]
26-
INSTALL_REQUIRES = ['devo-sdk==3.0.2', 'faker', 'jinja2>=2.10.1', 'psutil', 'click',
27-
'python-dateutil']
26+
INSTALL_REQUIRES = ['devo-sdk>=3.0.4,<4', 'faker', 'jinja2>=2.10.1', 'psutil',
27+
'click', 'python-dateutil']
2828
CLI = ['devo-faker=devoutils.faker.scripts.faker_cli:cli']
2929

3030

0 commit comments

Comments
 (0)