Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
sudo: false
language: python
python:
- 2.6
- 2.7
before_install:
- pip install codecov
install:
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install unittest2 importlib; fi
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install backport_collections unittest2 importlib; fi
- "pip install -r requirements.txt"
- "pip install -r dev-requirements.txt"
script: nosetests --with-coverage --cover-package=rejected
after_success:
- codecov
- coveralls
services:
- rabbitmq
deploy:
Expand All @@ -24,3 +24,6 @@ deploy:
all_branches: true
password:
secure: "QNndN99rD5boB/Sg3I0CzjkFUF1JmGrsQKZ7ONiA+obUWQDqOmggUoPEs1zN8xIExDcM4tPhlCQX0QiYJrKdLQwWiClvKo1wpYUxVm0s/W8SqvhV3IK9VxhMrbZUkmksO48TH4YKav06rEkVxke9g3U92XUJZ6cRAnYUKrjMYaQ="
cache:
directories:
- $HOME/.pip-cache/
11 changes: 4 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Rejected runs as a master process with multiple consumer configurations that are
each run it an isolated process. It has the ability to collect statistical
data from the consumer processes and report on it.

|Version| |Downloads| |Status| |Coverage| |License|
|Version| |Downloads| |Status| |License|

Features
--------
Expand Down Expand Up @@ -74,12 +74,12 @@ Example Configuration
config:
foo: True
bar: baz

Daemon:
user: rejected
group: daemon
pidfile: /var/run/rejected/example.%(pid)s.pid

Logging:
version: 1
formatters:
Expand Down Expand Up @@ -126,11 +126,8 @@ Available at https://rejected.readthedocs.org/en/latest/history.html
.. |Status| image:: https://travis-ci.org/gmr/rejected.svg?branch=master
:target: https://travis-ci.org/gmr/rejected

.. |Coverage| image:: https://coveralls.io/repos/gmr/rejected/badge.png
:target: https://coveralls.io/r/gmr/rejected

.. |Downloads| image:: https://pypip.in/d/rejected/badge.svg?
:target: https://pypi.python.org/pypi/rejected

.. |License| image:: https://pypip.in/license/rejected/badge.svg?
:target: https://rejected.readthedocs.org
21 changes: 14 additions & 7 deletions example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Application:
enabled: True
host: localhost
port: 8125
prefix: application.rejected
Connections:
rabbitmq:
host: localhost
Expand All @@ -17,18 +18,28 @@ Application:
vhost: /
heartbeat_interval: 300
Consumers:
async:
consumer: rejected.example.AsyncExampleConsumer
connections: [rabbitmq]
qty: 1
queue: test
dynamic_qos: True
ack: True
max_errors: 100
example:
consumer: rejected.example.ExampleConsumer
connections: [rabbitmq]
qty: 1
queue: generated_messages
queue: test
dynamic_qos: True
ack: True
max_errors: 100
config:
foo: True
bar: baz



Daemon:
user: rejected
group: daemon
Expand All @@ -38,7 +49,7 @@ Logging:
version: 1
formatters:
verbose:
format: "%(levelname) -10s %(asctime)s %(process)-6d %(processName) -25s %(name) -30s %(funcName) -30s: %(message)s"
format: "%(levelname) -10s %(asctime)s %(process)-6d %(processName) -15s %(name) -20s %(funcName) -20s: %(message)s"
datefmt: "%Y-%m-%d %H:%M:%S"
syslog:
format: "%(levelname)s <PID %(process)d:%(processName)s> %(name)s.%(funcName)s(): %(message)s"
Expand All @@ -63,13 +74,9 @@ Logging:
level: INFO
propagate: true
handlers: [console]
rejected.example:
level: INFO
propagate: false
handlers: [console]
ROOT:
level: CRITICAL
propagate: false
propagate: true
handlers: [console]
disable_existing_loggers: true
incremental: false
8 changes: 4 additions & 4 deletions rejected/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""
__author__ = 'Gavin M. Roy <gavinmroy@gmail.com>'
__since__ = "2009-09-10"
__version__ = "3.4.6"
__version__ = "3.5.0"

from consumer import Consumer
from consumer import PublishingConsumer
Expand All @@ -17,15 +17,15 @@
try:
from logging import NullHandler
except ImportError:

class NullHandler(logging.Handler):
"""Python 2.6 does not have a NullHandler"""

def emit(self, record):
"""Emit a record

:param record record: The record to emit

"""
pass


logging.getLogger('rejected').addHandler(NullHandler())
logging.getLogger('rejected.consumer').addHandler(NullHandler())
Loading