diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fa5907..0098a67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.3.11] - 2019-10-07 +### Added +- CancelledError catching in consume task + ## [1.3.10] - 2019-10-05 ### Added - Producer is_running attribute diff --git a/README.md b/README.md index a3ed487..ea468e3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# OctoBot-Channels [1.3.10](https://github.com/Drakkar-Software/OctoBot-Channels/blob/master/CHANGELOG.md) +# OctoBot-Channels [1.3.11](https://github.com/Drakkar-Software/OctoBot-Channels/blob/master/CHANGELOG.md) [![PyPI](https://img.shields.io/pypi/v/OctoBot-Channels.svg)](https://pypi.python.org/pypi/OctoBot-Channels/) [![Build Status](https://api.travis-ci.com/Drakkar-Software/OctoBot-Channels.svg?branch=master)](https://travis-ci.org/Drakkar-Software/OctoBot-Channels) [![Build status](https://ci.appveyor.com/api/projects/status/erg9ebvtco73x5h4?svg=true)](https://ci.appveyor.com/project/Herklos/octobot-channels) diff --git a/octobot_channels/constants.py b/octobot_channels/constants.py index da4883f..fd2b86e 100644 --- a/octobot_channels/constants.py +++ b/octobot_channels/constants.py @@ -15,6 +15,6 @@ # License along with this library. PROJECT_NAME = "OctoBot-Channels" -VERSION = "1.3.10" # major.minor.revision +VERSION = "1.3.11" # major.minor.revision CHANNEL_WILDCARD = "*" diff --git a/octobot_channels/consumer.py b/octobot_channels/consumer.py index 8c99098..67f2ddb 100644 --- a/octobot_channels/consumer.py +++ b/octobot_channels/consumer.py @@ -14,7 +14,7 @@ # You should have received a copy of the GNU Lesser General Public # License along with this library. import asyncio -from asyncio import Queue +from asyncio import Queue, CancelledError from octobot_commons.logging.logging_util import get_logger @@ -57,6 +57,8 @@ async def consume(self): while not self.should_stop: try: await self.perform(await self.queue.get()) + except CancelledError: + self.logger.warning("Cancelled task") except Exception as e: self.logger.exception(f"Exception when calling callback : {e}") finally: