Skip to content

Commit f345526

Browse files
committed
Bug Fixes
- Construct the proper InfluxDB base URL - Fix the mixin __init__ signature to support the new kwargs - Remove overly verbose logging
1 parent 05f94a2 commit f345526

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

rejected/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"""
55
__author__ = 'Gavin M. Roy <gavinmroy@gmail.com>'
66
__since__ = '2009-09-10'
7-
__version__ = '3.13.0'
7+
__version__ = '3.13.1'
88

99
import logging
1010
from logging import NullHandler

rejected/mixins.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ class GarbageCollectorMixin(object):
1616
"""
1717
DEFAULT_GC_FREQUENCY = 10000
1818

19-
def __init__(self, settings, process):
20-
self._collection_cycle = settings.get('gc_collection_frequency',
21-
self.DEFAULT_GC_FREQUENCY)
22-
super(GarbageCollectorMixin, self).__init__(settings, process)
19+
def __init__(self, *args, **kwargs):
20+
self._collection_cycle = \
21+
kwargs.get('settings', {}).get('gc_collection_frequency',
22+
self.DEFAULT_GC_FREQUENCY)
23+
super(GarbageCollectorMixin, self).__init__(*args, **kwargs)
2324
self._cycles_left = self.collection_cycle
2425

2526
@property

rejected/process.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,6 @@ def on_processed(self, message, result, start_time):
524524
self.counters[self.PROCESSED] += 1
525525
self.maybe_submit_measurement()
526526
self.reset_state()
527-
LOGGER.info('Exiting on_processed: %s', self.state_description)
528527

529528
def on_processing_error(self):
530529
"""Called when message processing failure happens due to a
@@ -854,7 +853,7 @@ def setup_influxdb(self, config):
854853
if key in os.environ:
855854
base_tags[key.lower()] = os.environ[key]
856855
influxdb.install(
857-
'{}://{}:{}'.format(
856+
'{}://{}:{}/write'.format(
858857
config.get('scheme',
859858
os.environ.get('INFLUXDB_SCHEME', 'http')),
860859
config.get('host',
@@ -892,7 +891,7 @@ def setup_instrumentation(self, config):
892891
# InfluxDB support
893892
if influxdb and config['stats'].get('influxdb'):
894893
self.influxdb = self.setup_influxdb(config['stats']['influxdb'])
895-
LOGGER.debug('InfluxDB measurements configured')
894+
LOGGER.debug('InfluxDB measurements configured: %r', self.influxdb)
896895

897896
def setup_sighandlers(self):
898897
"""Setup the stats and stop signal handlers."""

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from setuptools import setup
22

33
setup(name='rejected',
4-
version='3.13.0',
4+
version='3.13.1',
55
description='Rejected is a Python RabbitMQ Consumer Framework and '
66
'Controller Daemon',
77
long_description=open('README.rst').read(),

0 commit comments

Comments
 (0)