Skip to content

Commit

Permalink
Merge pull request #1090 from lukebakken/lrb-exp-stable-to-master
Browse files Browse the repository at this point in the history
Merge stable into master
  • Loading branch information
michaelklishin committed Jun 30, 2018
2 parents 03542ef + fb71b55 commit f5eca96
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ after_success:

jobs:
include:
- python: pypy3
- python: pypy
- python: 2.7
- python: 3.4
- python: 3.5
- python: 3.6
- python: 3.7-dev
- python: pypy
- python: pypy3
- stage: coverage
python: 3.6
services: []
Expand Down
49 changes: 49 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,55 @@ Version History

- `BlockingConnection.consume` now returns `(None, None, None)` when inactivity timeout is reached (`PR <https://github.com/pika/pika/pull/899>`_)

0.12.0 2018-06-19
-----------------

`GitHub milestone <https://github.com/pika/pika/milestone/12>`_

This is an interim release prior to version `1.0.0`. It includes the following backported pull requests and commits from the `master` branch:

- `PR #908 <https://github.com/pika/pika/pull/908>`_
- `PR #910 <https://github.com/pika/pika/pull/910>`_
- `PR #918 <https://github.com/pika/pika/pull/918>`_
- `PR #920 <https://github.com/pika/pika/pull/920>`_
- `PR #924 <https://github.com/pika/pika/pull/924>`_
- `PR #937 <https://github.com/pika/pika/pull/937>`_
- `PR #938 <https://github.com/pika/pika/pull/938>`_
- `PR #933 <https://github.com/pika/pika/pull/933>`_
- `PR #940 <https://github.com/pika/pika/pull/940>`_
- `PR #932 <https://github.com/pika/pika/pull/932>`_
- `PR #928 <https://github.com/pika/pika/pull/928>`_
- `PR #934 <https://github.com/pika/pika/pull/934>`_
- `PR #915 <https://github.com/pika/pika/pull/915>`_
- `PR #946 <https://github.com/pika/pika/pull/946>`_
- `PR #947 <https://github.com/pika/pika/pull/947>`_
- `PR #952 <https://github.com/pika/pika/pull/952>`_
- `PR #956 <https://github.com/pika/pika/pull/956>`_
- `PR #966 <https://github.com/pika/pika/pull/966>`_
- `PR #975 <https://github.com/pika/pika/pull/975>`_
- `PR #978 <https://github.com/pika/pika/pull/978>`_
- `PR #981 <https://github.com/pika/pika/pull/981>`_
- `PR #994 <https://github.com/pika/pika/pull/994>`_
- `PR #1007 <https://github.com/pika/pika/pull/1007>`_
- `PR #1045 <https://github.com/pika/pika/pull/1045>`_ (manually backported)
- `PR #1011 <https://github.com/pika/pika/pull/1011>`_

Commits:

Travis CI fail fast - 3f0e739

New features:

`BlockingConnection` now supports the `add_callback_threadsafe` method which allows a function to be executed correctly on the IO loop thread. The main use-case for this is as follows:

- Application sets up a thread for `BlockingConnection` and calls `basic_consume` on it
- When a message is received, work is done on another thread
- When the work is done, the worker uses `connection.add_callback_threadsafe` to call the `basic_ack` method on the channel instance.

Please see `examples/basic_consumer_threaded.py` for an example. As always, `SelectConnection` and a fully async consumer/publisher is the preferred method of using Pika.

Heartbeats are now sent at an interval equal to 1/2 of the negotiated idle connection timeout. RabbitMQ's default timeout value is 60 seconds, so heartbeats will be sent at a 30 second interval. In addition, Pika's check for an idle connection will be done at an interval equal to the timeout value plus 5 seconds to allow for delays. This results in an interval of 65 seconds by default.

0.11.2 2017-11-30
-----------------

Expand Down
49 changes: 49 additions & 0 deletions docs/version_history.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,55 @@ Version History

- `BlockingConnection.consume` now returns `(None, None, None)` when inactivity timeout is reached (`PR <https://github.com/pika/pika/pull/899>`_)

0.12.0 2018-06-19
-----------------

`GitHub milestone <https://github.com/pika/pika/milestone/12>`_

This is an interim release prior to version `1.0.0`. It includes the following backported pull requests and commits from the `master` branch:

- `PR #908 <https://github.com/pika/pika/pull/908>`_
- `PR #910 <https://github.com/pika/pika/pull/910>`_
- `PR #918 <https://github.com/pika/pika/pull/918>`_
- `PR #920 <https://github.com/pika/pika/pull/920>`_
- `PR #924 <https://github.com/pika/pika/pull/924>`_
- `PR #937 <https://github.com/pika/pika/pull/937>`_
- `PR #938 <https://github.com/pika/pika/pull/938>`_
- `PR #933 <https://github.com/pika/pika/pull/933>`_
- `PR #940 <https://github.com/pika/pika/pull/940>`_
- `PR #932 <https://github.com/pika/pika/pull/932>`_
- `PR #928 <https://github.com/pika/pika/pull/928>`_
- `PR #934 <https://github.com/pika/pika/pull/934>`_
- `PR #915 <https://github.com/pika/pika/pull/915>`_
- `PR #946 <https://github.com/pika/pika/pull/946>`_
- `PR #947 <https://github.com/pika/pika/pull/947>`_
- `PR #952 <https://github.com/pika/pika/pull/952>`_
- `PR #956 <https://github.com/pika/pika/pull/956>`_
- `PR #966 <https://github.com/pika/pika/pull/966>`_
- `PR #975 <https://github.com/pika/pika/pull/975>`_
- `PR #978 <https://github.com/pika/pika/pull/978>`_
- `PR #981 <https://github.com/pika/pika/pull/981>`_
- `PR #994 <https://github.com/pika/pika/pull/994>`_
- `PR #1007 <https://github.com/pika/pika/pull/1007>`_
- `PR #1045 <https://github.com/pika/pika/pull/1045>`_ (manually backported)
- `PR #1011 <https://github.com/pika/pika/pull/1011>`_

Commits:

Travis CI fail fast - 3f0e739

New features:

`BlockingConnection` now supports the `add_callback_threadsafe` method which allows a function to be executed correctly on the IO loop thread. The main use-case for this is as follows:

- Application sets up a thread for `BlockingConnection` and calls `basic_consume` on it
- When a message is received, work is done on another thread
- When the work is done, the worker uses `connection.add_callback_threadsafe` to call the `basic_ack` method on the channel instance.

Please see `examples/basic_consumer_threaded.py` for an example. As always, `SelectConnection` and a fully async consumer/publisher is the preferred method of using Pika.

Heartbeats are now sent at an interval equal to 1/2 of the negotiated idle connection timeout. RabbitMQ's default timeout value is 60 seconds, so heartbeats will be sent at a 30 second interval. In addition, Pika's check for an idle connection will be done at an interval equal to the timeout value plus 5 seconds to allow for delays. This results in an interval of 65 seconds by default.

0.11.2 2017-11-30
-----------------

Expand Down
1 change: 0 additions & 1 deletion examples/consume.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

logging.basicConfig(level=logging.DEBUG, format=LOG_FORMAT)


def on_message(chan, method_frame, _header_frame, body, userdata=None):
"""Called when a message is received. Log message and ack it."""
LOGGER.info('Userdata: %s Message body: %s', userdata, body)
Expand Down
1 change: 0 additions & 1 deletion tests/unit/heartbeat_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ def _adapter_add_timeout(self, deadline, callback):
def _adapter_remove_timeout(self, timeout_id):
raise NotImplementedError


class HeartbeatTests(unittest.TestCase):

INTERVAL = 60
Expand Down

0 comments on commit f5eca96

Please sign in to comment.